-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
38 lines (31 loc) · 800 Bytes
/
index.js
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
34
35
36
37
38
const {req,res} = require('express')
const express = require('express');
const app = express();
const ejs = require('ejs')
const PORT = 3500
app.set("view engine", "ejs");
app.get("/", (req,res) => {
console.log("Request made");
res.render("land")
})
app.get("/signup", (req, res) => {
console.log("Sign_up accessed")
res.render("signup", {message:""})
})
app.get("/login", (req, res) => {
console.log("Log_in accessed")
res.render("login", {message:""})
})
app.get("/dash", (req, res) => {
console.log("Dashboard accessed")
res.render("dash", {message:""})
})
app.post("/login", (req, res) => {
res.render("login")
})
app.post("/dash", (req, res) => {
res.render("dash")
})
app.listen(PORT, () => {
console.log("Server don start on port 3500");
})