Refactored codebase & auth bug fix

This commit is contained in:
2025-05-15 13:33:58 +03:00
parent 36226dbbac
commit eeda1b500d
13 changed files with 424 additions and 347 deletions
+22
View File
@@ -0,0 +1,22 @@
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;