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))); /* * Main endpoint - might implement authentication step here... */ router.get("/", (req, res) => { res.render("auth", { page_title: app_conf.name, css_path: path.join(app_conf.paths.css.web, "stylesheet.css"), protocol: app_conf.protocol, host: app_conf.host }); }); module.exports = router;