2018-08-01 01:01:16 +02:00
|
|
|
const checkForLocalConfig = require('./utils/checkForLocalConfig.js');
|
|
|
|
|
|
|
|
try {
|
|
|
|
checkForLocalConfig('lbryConfig');
|
|
|
|
checkForLocalConfig('loggerConfig');
|
|
|
|
checkForLocalConfig('slackConfig');
|
|
|
|
checkForLocalConfig('mysqlConfig');
|
|
|
|
checkForLocalConfig('siteConfig');
|
|
|
|
} catch (error) {
|
|
|
|
console.log(error);
|
|
|
|
process.exit(1);
|
|
|
|
}
|
|
|
|
|
2018-12-14 04:55:59 +01:00
|
|
|
let currentApp;
|
|
|
|
|
2018-08-01 01:01:16 +02:00
|
|
|
try {
|
2018-12-14 04:55:59 +01:00
|
|
|
const Server = require('./server/');
|
|
|
|
currentApp = Server;
|
|
|
|
|
2018-08-01 01:43:08 +02:00
|
|
|
const speech = new Server();
|
|
|
|
speech.start();
|
2018-12-14 04:55:59 +01:00
|
|
|
|
2018-08-01 01:01:16 +02:00
|
|
|
} catch (error) {
|
|
|
|
console.log('server startup error:', error);
|
|
|
|
process.exit(1);
|
|
|
|
}
|
2018-12-14 04:55:59 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
TODO: Finish SSR HMR
|
|
|
|
if (module.hot) {
|
|
|
|
module.hot.accept('./server', () => {
|
|
|
|
server.removeListener('request', currentApp);
|
|
|
|
server.on('request', app);
|
|
|
|
currentApp = app;
|
|
|
|
})
|
|
|
|
}
|
|
|
|
*/
|