2018-08-01 01:01:16 +02:00
|
|
|
// module imports
|
|
|
|
const moduleAlias = require('module-alias');
|
2018-09-03 01:48:35 +02:00
|
|
|
require('@babel/polyfill');
|
2018-08-01 01:01:16 +02:00
|
|
|
|
|
|
|
// local imports
|
|
|
|
const createModuleAliases = require('./utils/createModuleAliases.js');
|
|
|
|
const checkForLocalConfig = require('./utils/checkForLocalConfig.js');
|
|
|
|
|
|
|
|
const customAliases = createModuleAliases();
|
|
|
|
moduleAlias.addAliases(customAliases);
|
|
|
|
|
|
|
|
try {
|
|
|
|
checkForLocalConfig('lbryConfig');
|
|
|
|
checkForLocalConfig('loggerConfig');
|
|
|
|
checkForLocalConfig('slackConfig');
|
|
|
|
checkForLocalConfig('mysqlConfig');
|
|
|
|
checkForLocalConfig('siteConfig');
|
|
|
|
} catch (error) {
|
|
|
|
console.log(error);
|
|
|
|
process.exit(1);
|
|
|
|
}
|
|
|
|
|
|
|
|
try {
|
2018-08-01 01:43:08 +02:00
|
|
|
const Server = require('./server/index.js');
|
|
|
|
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);
|
|
|
|
}
|