Added some comments
This commit is contained in:
parent
43ab7dd367
commit
695e283246
@ -7,15 +7,19 @@
|
||||
* Add actual data into the responses
|
||||
*/
|
||||
|
||||
// Modules
|
||||
const express = require('express');
|
||||
const http = require('http');
|
||||
const fn = require('./functions.js').functions;
|
||||
const { dbfn } = require('./functions.js');
|
||||
|
||||
// Grab the current configuration settings from the database to display
|
||||
var config;
|
||||
fn.commands.refreshConfig().then(newConfig => {
|
||||
config = newConfig.config;
|
||||
});
|
||||
const { dbfn } = require('./functions.js');
|
||||
|
||||
// Create the server
|
||||
const app = express();
|
||||
const server = http.createServer(app);
|
||||
app.use(express.urlencoded());
|
||||
@ -29,7 +33,7 @@ app.set('view engine', 'html');
|
||||
|
||||
// A normal load of the root page
|
||||
app.get('/', (req, res) => {
|
||||
// if (process.env.DEBUG) console.log(`[${(Date.now() - config.timestamps.procStart)/1000}] I: ${JSON.stringify(config)}`);
|
||||
// Render the page, passing the config along for the front end to use
|
||||
res.render('index', { config: JSON.stringify(config) });
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user