Make app port configurable

This commit is contained in:
Alice Gaudon 2020-05-05 15:22:36 +02:00
parent 9b46691b99
commit 36893750bf
2 changed files with 3 additions and 1 deletions

View File

@ -1,4 +1,5 @@
export default Object.assign(require("wms-core/config/default").default, {
port: 4899,
mysql: {
connectionLimit: 10,
host: "localhost",

View File

@ -1,8 +1,9 @@
import Logger from "wms-core/Logger";
import Aldap from "./Aldap";
import config from "config";
(async () => {
const app = new Aldap(4899);
const app = new Aldap(config.get<number>('port'));
await app.start();
})().catch(err => {
Logger.error(err);