|
|
@ -1,9 +1,6 @@ |
|
|
|
//sending static content
|
|
|
|
const includes = require('../includes/includes.js'); |
|
|
|
|
|
|
|
//used for file IO
|
|
|
|
const utils = require('../utils/utils.js'); |
|
|
|
|
|
|
|
|
|
|
|
//used to append static content to result
|
|
|
|
const contentLoader = require('../includes/staticContentServer.js'); |
|
|
@ -40,11 +37,11 @@ module.exports= |
|
|
|
const file = "../admin/admin.js"; |
|
|
|
|
|
|
|
var templateContext = Object(); |
|
|
|
Promise.all([includes.fetchTemplate("admin/adminMain.html")], |
|
|
|
Promise.all([includes.fetchTemplate("admin/adminMain.html"), |
|
|
|
includes.printAdminHeader(templateContext), |
|
|
|
require(file).main(request, clientAddress, templateContext, filename), |
|
|
|
includes.printFooter(templateContext) |
|
|
|
).then(function(content) |
|
|
|
includes.printFooter(templateContext), |
|
|
|
]).then(function(content) |
|
|
|
{ |
|
|
|
result.write(whiskers.render(content[0], templateContext)); |
|
|
|
result.end(); |
|
|
|