update.eternae.ink/src/main.ts

16 lines
466 B
TypeScript
Raw Normal View History

// Load config from specified path or default + wms-core/config (default defaults)
process.env['NODE_CONFIG_DIR'] =
(process.env['NODE_CONFIG_DIR'] || './config/')
+ require('path').delimiter
+ __dirname + '/core-config/';
2020-04-23 18:07:55 +02:00
import Logger from "wms-core/Logger";
2020-06-27 17:20:06 +02:00
import App from "./App";
import config from "config";
2020-04-23 18:07:55 +02:00
(async () => {
2020-06-27 17:20:06 +02:00
const app = new App(config.get<number>('port'));
2020-04-23 18:07:55 +02:00
await app.start();
})().catch(err => {
Logger.error(err);
});