-
Notifications
You must be signed in to change notification settings - Fork 3
/
app.js
42 lines (40 loc) · 1.44 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
const express = require("express");
const app = express();
const port = 3000;
const helmet = require("helmet");
app.set("view engine", "ejs");
app.use(express.static("public"));
app.use(express.urlencoded({ extended: true }));
app.use(helmet());
// For Public File
app.get("/", (req, res) => {
res.render("index", { myTitle: "القرأن الكريم" });
});
app.get("/quran", (req, res) => {
res.render("quran", { myTitle: "المصحف | القرأن الكريم" });
});
app.get(`/quran/:id`, (req, res) => {
res.render("sora", { myTitle: "القرأن الكريم" });
});
app.get("/citationForMorning", (req, res) => {
res.render("citationForMorning", { myTitle: "اذكار الصباح | القرأن الكريم" });
});
app.get("/eveningPrayers", (req, res) => {
res.render("eveningPrayers", { myTitle: "اذكار المساء | القرأن الكريم" });
});
app.get("/otherRemembrancesAndOtherSupplications", (req, res) => {
res.render("otherRemembrancesAndOtherSupplications", {
myTitle: "القرأن الكريم",
});
});
app.get("/roqia", (req, res) => {
res.render("roqia", { myTitle: "الرقيه الشرعية | القرأن الكريم" });
});
// 404 Page Not Found
app.use((req, res) => {
res.status(404).render("page-not-found", { myTitle: "الصفحه غير موجوده" });
});
// https://muslimsnour.live/azkar/evening
app.listen(process.env.PORT || port, () => {
console.log(`http://localhost:${port}`);
});