-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver.js
41 lines (32 loc) · 1.2 KB
/
server.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
const express = require('express');
const path = require('path');
const app = express();
app.use('/static', express.static('public'));
app.get('/', function(req, res) {
res.sendFile(path.join(__dirname, '/index.html'));
});
app.get('/index.html', function(req, res) {
res.sendFile(path.join(__dirname, '/index.html'));
});
app.get('/login', function(req, res) {
res.sendFile(path.join(__dirname, '/login.html'));
});
app.get('/subjects/computer_courses.html', function(req, res) {
res.sendFile(path.join(__dirname, '/subjects/computer_courses.html'));
});
app.get('/subjects/advanced.html', function(req, res) {
res.sendFile(path.join(__dirname, '/subjects/advanced.html'));
});
app.get('/subjects/stem.html', function(req, res) {
res.sendFile(path.join(__dirname, '/subjects/stem.html'));
});
app.get('/subjects/quiz.html', function(req, res) {
res.sendFile(path.join(__dirname, '/subjects/quiz.html'));
});
// app.get('/contact', function(req, res) {
// res.sendFile(path.join(__dirname, '/contact.html'));
// });
// app.get('/testimonials', function(req, res) {
// res.sendFile(path.join(__dirname, '/testimonials.html'));
// });
app.listen(5000, console.log('server is listening'));