2022-08-13 16:15:08 +02:00
|
|
|
const express = require("express");
|
|
|
|
const path = require("path");
|
|
|
|
const app = express();
|
|
|
|
|
|
|
|
app.use(express.static(path.join(__dirname, "public")));
|
|
|
|
|
|
|
|
app.set("view engine", "ejs");
|
|
|
|
app.set("views", path.join(__dirname, "views"));
|
|
|
|
|
2022-12-20 20:40:34 +01:00
|
|
|
app.get("/", (req, res) => {
|
2022-08-13 16:15:08 +02:00
|
|
|
res.render("home")
|
|
|
|
})
|
|
|
|
|
2022-12-20 20:40:34 +01:00
|
|
|
app.get("/rices", (req, res) => {
|
|
|
|
res.render("rices")
|
|
|
|
})
|
2022-08-13 16:15:08 +02:00
|
|
|
|
2022-12-20 20:40:34 +01:00
|
|
|
app.get("*", (req, res) => {
|
2022-08-13 16:15:08 +02:00
|
|
|
res.render("404")
|
|
|
|
})
|
|
|
|
|
|
|
|
app.listen(4000, () => {
|
|
|
|
console.log("Listening to PORT: 4000");
|
|
|
|
});
|