Fixed config defined too late

This commit is contained in:
Ajay Ramachandran 2019-10-27 18:02:12 -04:00
parent 7b413dcbb2
commit e87f804070

View file

@ -7,14 +7,14 @@ var app = express();
//hashing service
var crypto = require('crypto');
let config = JSON.parse(fs.readFileSync('config.json'));
//load database
var sqlite3 = require('sqlite3').verbose();
var db = new sqlite3.Database(config.db);
//where the more sensitive data such as IP addresses are stored
var privateDB = new sqlite3.Database(config.privateDB);
let config = JSON.parse(fs.readFileSync('config.json'));
// Create an HTTP service.
http.createServer(app).listen(config.port);