Merge pull request #30 from ajayyy/experimental

Added port to config
This commit is contained in:
Ajay Ramachandran 2019-09-04 13:41:25 -04:00 committed by GitHub
commit d130af130b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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;