Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default (api, opts = {}) => {
const datahubConfig = {
port: 5678,
hostname: '127.0.0.1',
store: join(__dirname, 'data'),
proxy: {},
showBoard: false,
...opts,
};
const defaultDatahub = new DataHub({
port: datahubConfig.port,
});
api.register('beforeServerWithApp', ({ args: { app } }) => {
datahubMiddleware(app)(datahubConfig);
defaultDatahub.startServer(datahubConfig).then(() => {
console.log('datahub ready');
});
});
};