git ssb

1+

dinoworm ๐Ÿ› / catstack



Tree: 4b1462a0182a814136c0bdf3b47e5a45f12a63f6

Files: 4b1462a0182a814136c0bdf3b47e5a45f12a63f6 / app / api.js

421 bytesRaw
1import feathers from 'feathers'
2import { mapObjIndexed, reduce, toPairs } from 'ramda'
3
4import services from 'app/services'
5import config from 'app/config'
6
7export default function createServer (config) {
8 const app = feathers()
9
10 useAll(app, services)
11
12 return app
13}
14
15function 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