Skip to content

hemerajs/hemera-sql-store

Repository files navigation

Hemera-sql-store package

Build Status npm styled with prettier

Generic SQL client for Hemera. If you need a different driver you can install it with npm install --save <driver>. For more informations see Knex.

Install

npm i hemera-sql-store mysql --save

Start Mariadb with Docker

docker-compose up

Running the tests

npm run test

Example

const hemera = new Hemera(nats)
hemera.use(require('hemera-joi'))
hemera.use(require('hemera-sql-store'), {
  knex: {
    dialect: 'mysql',
    connection: {
      host: '127.0.0.1',
      user: '',
      password: '',
      database: 'test'
    }
  }
})

API

See Store Interface.