const express = require('express'); /**Creates a constant(meaning it cannot be changed) called "express" and make it require the express module*/ const app = express() /**Creates a constant(meaning it cannot be changed) called "app" and make itequal to the nicknamed constant as a method*/ const port = 5500/**Creates a constant(meaning it cannot be changed) called "port" and equal it to a value of 3000*/ const expressLayout = require("express-ejs-layouts"); //STATIC FILES app.use(express.static("src/public")) /**Uses the .use() method of the nicknamed constant "app" and passes the .static() method of the nicknamed constant "express" telling the the location(src/public)*/ app.use("/css", express.static(__dirname + "src/public/css"))/**Uses the .use() method of the nicknamed constant "app" with the parameters of "/css"(part of the location) and the .static() method of the nicknamed constant "express" with its own parameter of __dirname plus the whole location(src/public/css)*/ app.use("/img", express.static(__dirname + "src/public/img"))/**Uses the .use() method of the nicknamed constant "app" with the parameters of "/img"(part of the location) and the .static() method of the nicknamed constant "express" with its own parameter of __dirname plus the whole location(src/public/img)*/ app.use("/js", express.static(__dirname + "src/public/js"))/**Uses the .use() method of the nicknamed constant "app" with the parameters of "/js"(part of the location) and the .static() method of the nicknamed constant "express" with its own parameter of __dirname plus the whole location(src/public/js)*/ //SET TEMPLATING app.use(expressLayout) app.set("layout", "Homepage") //SET VIEWS app.set("views", "./src/views") app.set("view engine", "ejs") app.get("", (req, res) => { res.render("Homepage") }) app.get("/Schedule", (req, res) => { res.render("Schedule") }) app.listen(port, () => console.log("Listening on port: " + port))/**Use the .listen() method in the nicknamed constant "app" to lsten to the nicknamed constant port with localhost(i.e https://localhost:3000) and logs some text in the console*/