git ssb

16+

Dominic / patchbay



Tree: 261718c426b0d5a333dfa4acc00aacf92c5fe394

Files: 261718c426b0d5a333dfa4acc00aacf92c5fe394 / ui.js

734 bytesRaw
1const combine = require('depject')
2const entry = require('depject/entry')
3const nest = require('depnest')
4const values = require('lodash/values')
5
6const { patchcore, patchbay, plugins, configModule } = require('./exports')
7
8function Start (config) {
9 if (!config) throw new Error('patchbay/ui.js needs to be provided with a valid server config')
10
11 // polyfills
12 require('setimmediate')
13
14 const sockets = combine(
15 ...values(plugins), // TODO spin up settings check which modules are wanted
16 configModule(config),
17 patchbay,
18 patchcore
19 )
20 // plugins loaded first will over-ride core modules loaded later
21
22 const api = entry(sockets, nest('app.sync.start', 'first'))
23 api.app.sync.start()
24}
25
26module.exports = Start
27

Built with git-ssb-web