spee.ch/server.js

38 lines
739 B
JavaScript
Raw Normal View History

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);
}
let currentApp;
2018-08-01 01:01:16 +02:00
try {
const Server = require('./server/');
currentApp = Server;
const speech = new Server();
speech.start();
2018-08-01 01:01:16 +02:00
} catch (error) {
console.log('server startup error:', error);
process.exit(1);
}
/*
TODO: Finish SSR HMR
if (module.hot) {
module.hot.accept('./server', () => {
server.removeListener('request', currentApp);
server.on('request', app);
currentApp = app;
})
}
*/