Files: 3048b3bf2ed0eb30f2d4548e99cdb3a9868e8dd5 / app / service.js
339 bytesRaw
1 | import knexService from 'feathers-knex' |
2 | import memoryService from 'feathers-memory' |
3 | import { assign } from 'lodash' |
4 | |
5 | function dbService (options) { |
6 | var db = require('app/db').default |
7 | |
8 | return knexService( |
9 | assign(options, { |
10 | Model: db |
11 | }) |
12 | ) |
13 | } |
14 | |
15 | export default process.env.NODE_ENV === 'test' ? |
16 | memoryService : |
17 | dbService |
18 |
Built with git-ssb-web