-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.js
More file actions
33 lines (26 loc) · 733 Bytes
/
Copy pathindex.js
File metadata and controls
33 lines (26 loc) · 733 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
const express = require("express");
const app = express();
const path = require("path");
let port = 8080;
app.listen(port, () => {
console.log(`app is listening on port ${port}`);
});
app.use(express.urlencoded({ extended: true }));
app.set("view engine", "ejs");
app.set("views", path.join(__dirname, "views"));
app.use(express.static(path.join(__dirname, "/public")));
app.get("/", (req, res) => {
res.send("Root working");
});
app.get("/brand", (req, res) => {
res.render("index.ejs");
});
app.get("/customer/review", (req, res) => {
res.render("review.ejs");
});
app.get("/customer", (req, res) => {
res.render("customer.ejs");
});
app.get("/customer/review/add", (req, res) => {
res.render("upload.ejs");
});