Files: 99bc16e5212f7086422943407911f7c31443ab4c / app / api.js
421 bytesRaw
1 | import feathers from 'feathers' |
2 | import { mapObjIndexed, reduce, toPairs } from 'ramda' |
3 | |
4 | import services from 'app/services' |
5 | import config from 'app/config' |
6 | |
7 | export default function createServer (config) { |
8 | const app = feathers() |
9 | |
10 | useAll(app, services) |
11 | |
12 | return app |
13 | } |
14 | |
15 | function useAll (app, services) { |
16 | return reduce((app, [name, service]) => { |
17 | return app.use(`/${name}`, service) |
18 | }, app, toPairs(services)) |
19 | } |
20 |
Built with git-ssb-web