Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hemerajs/hemera-sql-store
Generic SQL client for Hemera
https://github.com/hemerajs/hemera-sql-store
hemerajs sql store
Last synced: about 2 months ago
JSON representation
Generic SQL client for Hemera
- Host: GitHub
- URL: https://github.com/hemerajs/hemera-sql-store
- Owner: hemerajs
- License: mit
- Created: 2017-12-24T11:23:35.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-10T13:54:38.000Z (over 6 years ago)
- Last Synced: 2024-04-23T18:14:36.608Z (9 months ago)
- Topics: hemerajs, sql, store
- Language: JavaScript
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hemera-sql-store package
[![Build Status](https://travis-ci.org/hemerajs/hemera-sql-store.svg?branch=master)](https://travis-ci.org/hemerajs/hemera-sql-store)
[![npm](https://img.shields.io/npm/v/hemera-sql-store.svg?maxAge=3600)](https://www.npmjs.com/package/hemera-sql-store)
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](#badge)Generic SQL client for Hemera. If you need a different driver you can install it with `npm install --save `.
For more informations see [Knex](http://knexjs.org/).## Install
```
npm i hemera-sql-store mysql --save
```## Start Mariadb with Docker
```
docker-compose up
```## Running the tests
```
npm run test
```## Example
```js
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](https://github.com/hemerajs/hemera/tree/master/packages/hemera-store) Interface.