Files: c8f38fdc12fc63564d14f8dc103917bdbbfcadcd / 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