npm.io
0.5.35 • Published 2 years ago

@z1/preset-feathers-server-sql

Licence
MIT
Version
0.5.35
Deps
13
Size
10 kB
Vulns
5
Weekly
0
Stars
9

Z1 Preset Feathers Server SQL

Documentation under construction.

Dependencies

Usage

Install
yarn add @z1/preset-feathers-server-sql
Import
import {  
  Knex,
  FeathersKnex,
  Sequelize,
  FeathersSequelize
} from '@z1/preset-feathers-server-sql'
Example

var knex = Knex({
  client: 'mysql',
  connection: {
    host : '127.0.0.1',
    user : 'your_database_user',
    password : 'your_database_password',
    database : 'myapp_test'
  }
});

app.use(`/${path}`, FeathersKnex(
  { Model, name, id, events, paginate })
)

const sequelize = new Sequelize('sqlite::memory:');

app.use(`/${path}`, FeathersSequelize(
  { Model, id, events, paginate })
)