-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
33 lines (25 loc) · 853 Bytes
/
app.js
File metadata and controls
33 lines (25 loc) · 853 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
const express = require("express");
const server = express();
server.use(express.static(__dirname + "/public"));
server.get("/", (req, res) => {
res.sendFile(__dirname + "/html/LoginPage.html");
});
server.get("/lecturePage.html", (req, res) => {
res.sendFile(__dirname + "/html/lecturePage.html");
});
server.get("/calculatePage.html", (req, res) => {
res.sendFile(__dirname + "/html/calculatePage.html");
});
server.get("/assignmentPage.html", (req, res) => {
res.sendFile(__dirname + "/html/assignmentPage.html");
});
server.get("/calculatorTest.html", (req, res) => {
res.sendFile(__dirname + "/html/calculator.html");
});
server.use((req, res) => {
res.sendFile(__dirname + "/html/404.html");
});
server.listen(3000, (err) => {
if (err) return console.log(err);
console.log("The server is listening on port 3000");
});