forked from AMAN123956/ssb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
116 lines (104 loc) · 2.83 KB
/
app.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
const express = require("express");
const bodyParser = require("body-parser");
const ejs = require("ejs");
const hostname = "127.0.0.1";
const port = process.env.PORT || "3000";
//List of letiables
const app = express();
app.use(express.static("public"));
// app.use("/views", express.static(__dirname + "/views"));
app.set("view engine", "ejs");
app.use(bodyParser.urlencoded({
extended: true
}));
/* Home Page */
app.get("/", (req, res) => {
let pageTitle = "SSB|HOME";
let cssName = "css/styles.css";
res.render("landing", {
pageTitle: pageTitle,
cssFile: cssName,
});
});
// officer entries Mens page
app.get("/men",(req,res)=>{
let pageTitle = "SSB|MEN";
let cssName = "css/Men.css";
res.render("Men", {
pageTitle: pageTitle,
cssFile: cssName,
});
})
// officer entries Womens page
app.get("/women",(req,res)=>{
let pageTitle = "SSB|MEN";
let cssName = "css/Men.css";
res.render("Women", {
pageTitle: pageTitle,
cssFile: cssName,
});
})
/* Written Examination */
app.get("/written/acc",(req,res)=>{
let pageTitle = "SSB|WRITTEN";
let cssName = "./../css/written/exam.css";
res.render("Written-Examination/ACC", {
pageTitle: pageTitle,
cssFile: cssName,
});
})
app.get("/written/nda",(req,res)=>{
let pageTitle = "SSB|WRITTEN";
let cssName = "./../css/written/exam.css";
res.render("Written-Examination/NDA", {
pageTitle: pageTitle,
cssFile: cssName,
});
})
app.get("/written/afcat",(req,res)=>{
let pageTitle = "SSB|WRITTEN";
let cssName = "./../css/written/exam.css";
res.render("Written-Examination/AFCAT", {
pageTitle: pageTitle,
cssFile: cssName,
});
})
app.get("/written/cds",(req,res)=>{
let pageTitle = "SSB|WRITTEN";
let cssName = "./../css/written/exam.css";
res.render("Written-Examination/CDS", {
pageTitle: pageTitle,
cssFile: cssName,
});
})
/* SSB interview */
app.get("/ssbinterview", (req, res) => {
let pageTitle = "SSB|Interview";
let cssName = "./css/interview.css";
res.render("ssb-interview", {
pageTitle: pageTitle,
cssFile: cssName,
});
})
/* Team Section */
app.get("/team", (req, res) => {
let pageTitle = "SSB|TEAM";
let cssName = "./css/about.css";
res.render("about", {
pageTitle: pageTitle,
cssFile: cssName,
})
})
// interview tips page
app.get("/interviewTips",(req,res)=>{
let pageTitle="SSB|Tips";
let cssName="./css/interviewTips.css";
res.render("interviewTips",{
pageTitle:pageTitle,
cssFile:cssName
})
})
/* Port */
app.listen(port, () => {
console.log(`Server running at http://${hostname}:${port}/`);
});