Initial commit
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
const path = require("path");
|
||||
const app_conf = require("../config/app.conf.js");
|
||||
|
||||
const express = require('express');
|
||||
const router = express.Router();
|
||||
|
||||
router.use(app_conf.paths.css.web, express.static(path.join(path.dirname(require.main.filename), app_conf.paths.css.src)));
|
||||
router.use(app_conf.paths.js.web, express.static(path.join(path.dirname(require.main.filename), app_conf.paths.js.src)));
|
||||
router.use(app_conf.paths.chartjs.web, express.static(path.join(path.dirname(require.main.filename), app_conf.paths.chartjs.src)));
|
||||
|
||||
/*
|
||||
* Main endpoint - might implement authentication step here...
|
||||
*/
|
||||
router.get("/", (req, res) => {
|
||||
res.render("auth", {
|
||||
page_title: app_conf.name,
|
||||
|
||||
program: app_conf.program,
|
||||
css_path: path.join(app_conf.paths.css.web, "stylesheet.css"),
|
||||
protocol: app_conf.protocol,
|
||||
host: app_conf.host,
|
||||
port: app_conf.port
|
||||
});
|
||||
});
|
||||
|
||||
module.exports = router;
|
||||
Reference in New Issue
Block a user