Files: e077e8e4d717d2c79b41f7287c20906ac86841db / app / stack / services.js
424 bytesRaw
1 | const feathers = require('feathers') |
2 | const { mapObjIndexed, reduce, toPairs } = require('ramda') |
3 | |
4 | const services = require('app/services') |
5 | |
6 | module.exports = createServices |
7 | |
8 | function createServices(config) { |
9 | const app = feathers() |
10 | |
11 | useAll(app, services) |
12 | |
13 | return app |
14 | } |
15 | |
16 | function useAll (app, services) { |
17 | return reduce((app, [name, service]) => { |
18 | return app.use(`/${name}`, service) |
19 | }, app, toPairs(services)) |
20 | } |
21 | |
22 |
Built with git-ssb-web