-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
39 lines (29 loc) · 819 Bytes
/
Copy pathscript.js
File metadata and controls
39 lines (29 loc) · 819 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
34
35
36
37
38
39
// const bar = document.getElementById('bar');
// const nav = document.getElementById('navbar');
// if (bar) {
// bar.addEventListener('click', () => {
// nav.classList.add('active');
// })
// }
const express = require('express');
const app = express();
const ejs = require('ejs');
// document.getElementById("sentence").setAttribute("class","active");
app.set('view engine','ejs');
app.use(express.static('CSS'));
app.use("/images",express.static('images'));
app.get("/",function(req,res){
res.render("home");
});
app.get("/blog",function(req,res){
res.render("blog");
})
app.get("/about",function(req,res){
res.render("about");
})
app.get("/contact",function(req,res){
res.render("contact");
})
app.listen(3000,function(){
console.log("App is listening to port 3000")
});