ily.li/src/main.ts

18 lines
567 B
TypeScript

// Load config from specified path or default + wms-core/config (default defaults)
process.env['NODE_CONFIG_DIR'] =
__dirname + '/../node_modules/wms-core/config/'
+ require('path').delimiter
+ (process.env['NODE_CONFIG_DIR'] || __dirname + '/../config/');
import Logger from "wms-core/Logger";
import App from "./App";
import config from "config";
(async () => {
Logger.debug('Config path:', process.env['NODE_CONFIG_DIR']);
const app = new App(config.get<number>('port'));
await app.start();
})().catch(err => {
Logger.error(err);
});