| 123456789101112131415161718192021222324 |
- const Schmervice = require('@hapipal/schmervice')
-
- const all = require('../routes/client')
- // const UserService = require('./services/user')
-
- module.exports = {
- name: 'client-plugin',
- version: '1.0.0',
- opts: {}, // No need to prefix the gui
- register: async (server, options) => {
-
- // Bind to global context
- // So we can use Objection transactions
- server.bind({
- transaction: fn => ({ foo: 'bar' }),
- })
-
- await server.register(Schmervice)
- // server.registerService(UserService)
- for(let route of all) {
- await server.route(route)
- }
- },
- }
|