diff options
Diffstat (limited to 'src/services')
-rw-r--r-- | src/services/index.ts | 2 | ||||
-rw-r--r-- | src/services/waybills.service.ts | 10 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/services/index.ts b/src/services/index.ts index 9b3511b..cabfff3 100644 --- a/src/services/index.ts +++ b/src/services/index.ts @@ -1,10 +1,12 @@ import { Application } from '@feathersjs/express'; import Products from './products.service'; import Contractors from './contractors.service'; +import Waybills from './waybills.service'; export default (app: Application): void => { app.configure(Products); app.configure(Contractors); + app.configure(Waybills); app.get('/ping', (req, res) => res.send('pong')); }; diff --git a/src/services/waybills.service.ts b/src/services/waybills.service.ts new file mode 100644 index 0000000..7aea1e3 --- /dev/null +++ b/src/services/waybills.service.ts @@ -0,0 +1,10 @@ +import { Application } from '@feathersjs/express'; +import service from 'feathers-mongoose'; +import Model from '../models/waybill/waybill.model'; + +const waybills = service({ Model }); + +export default (app: Application): void => { + app.use('/waybills', waybills); +}; + |