mirror of
https://github.com/TheGreyDiamond/elevatormapRewritten.git
synced 2025-07-18 02:23:50 +02:00
Get port from config
This commit is contained in:
@ -3,6 +3,7 @@
|
|||||||
"mapboxAccessToken": "",
|
"mapboxAccessToken": "",
|
||||||
"cookieSecret": "",
|
"cookieSecret": "",
|
||||||
"serverAdress": "",
|
"serverAdress": "",
|
||||||
|
"port": 3000,
|
||||||
"mysql": {
|
"mysql": {
|
||||||
"user": "",
|
"user": "",
|
||||||
"password": "",
|
"password": "",
|
||||||
|
6
index.ts
6
index.ts
@ -127,10 +127,8 @@ app.use(csp.contentSecurityPolicy({
|
|||||||
}))
|
}))
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Settings
|
|
||||||
const port = 3000;
|
|
||||||
const startUpTime = Math.floor(new Date().getTime() / 1000);
|
|
||||||
|
|
||||||
|
const startUpTime = Math.floor(new Date().getTime() / 1000);
|
||||||
|
|
||||||
let fontawesomeKey = "";
|
let fontawesomeKey = "";
|
||||||
let mapboxAccessToken = "";
|
let mapboxAccessToken = "";
|
||||||
@ -140,6 +138,7 @@ let mailConf = { "host": "", "port": 0, "username": "", "password": "" };
|
|||||||
let serverAdress = "";
|
let serverAdress = "";
|
||||||
let cookieSecret = ""
|
let cookieSecret = ""
|
||||||
let jsonConfigGlobal = {};
|
let jsonConfigGlobal = {};
|
||||||
|
let port = 3000;
|
||||||
|
|
||||||
// Load config
|
// Load config
|
||||||
try {
|
try {
|
||||||
@ -159,6 +158,7 @@ try {
|
|||||||
|
|
||||||
mailConf = jsonConfig.mail;
|
mailConf = jsonConfig.mail;
|
||||||
serverAdress = jsonConfig.serverAdress;
|
serverAdress = jsonConfig.serverAdress;
|
||||||
|
port = jsonConfig.port;
|
||||||
cookieSecret =
|
cookieSecret =
|
||||||
jsonConfig.cookieSecret || "saF0DSF65AS4DF0S4D6F0S54DF0Fad";
|
jsonConfig.cookieSecret || "saF0DSF65AS4DF0S4D6F0S54DF0Fad";
|
||||||
jsonConfigGlobal = jsonConfig;
|
jsonConfigGlobal = jsonConfig;
|
||||||
|
Reference in New Issue
Block a user