const express = require("express"); const exphbs = require("express-handlebars"); const path = require("path"); const hbs = require("hbs"); const app = express(); const bodyParser = require("body-parser"); const viewpath = path.join(__dirname, "/templates/views"); const partials = path.join(__dirname, "/templates/partials"); app.set("view engine", "hbs"); app.set("views", viewpath); hbs.registerPartials(partials); app.use(express.static("public")); app.get("/", (req, res) => { res.render("login"); }); app.get("/home", (req, res) => { res.render("index"); });
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)