Added port to config

This commit is contained in:
Ajay Ramachandran
2019-09-04 13:41:07 -04:00
parent 347ae87b12
commit ff0b661f26
2 changed files with 4 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
{
"port": 80,
"globalSalt": "[global salt (pepper) that is added to every ip before hashing to make it even harder for someone to decode the ip]",
"adminUserID": "[the hashed id of the user who can perform admin actions]",
"behindProxy": true

View File

@@ -13,11 +13,11 @@ var db = new sqlite3.Database('./databases/sponsorTimes.db');
//where the more sensitive data such as IP addresses are stored
var privateDB = new sqlite3.Database('./databases/private.db');
// Create an HTTP service.
http.createServer(app).listen(80);
let config = JSON.parse(fs.readFileSync('config.json'));
// Create an HTTP service.
http.createServer(app).listen(config.port);
var globalSalt = config.globalSalt;
var adminUserID = config.adminUserID;