-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
33 lines (26 loc) · 1.06 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
// Require Needed Ressources
const express = require("express")
const routes = require("./routes/routes")
// Init Express
const app = express()
// Set View Engine -- pug --
app.set("view engine", "pug")
// Set Common Middlewares
app.use(express.json())
app.use(express.urlencoded({ extended: false }))
// Include Libraries From Node Modules
app.use("/bootstrap", express.static(__dirname + "/node_modules/bootstrap/dist"))
app.use("/remixicon", express.static(__dirname + "/node_modules/remixicon/fonts"))
app.use("/aos", express.static(__dirname + "/node_modules/aos/dist"))
app.use("/slick", express.static(__dirname + "/node_modules/slick-carousel/slick"))
app.use("/plyr", express.static(__dirname + "/node_modules/plyr/dist"))
app.use("/jquery", express.static(__dirname + "/node_modules/jquery/dist"))
// Set Static Folder
app.use(express.static(__dirname + "/public"))
// Include Routes
app.use("/", routes)
// Run The App Locally on Port 5000
const PORT = process.env.PORT || 5000;
app.listen(PORT, () =>
console.log(`Listenning on port ${PORT} => http://localhost:5000`)
)