-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver.js
41 lines (31 loc) · 944 Bytes
/
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(express.static(__dirname + '/public'));
app.get('/', (req, res) => {
res.sendFile(path.join(__dirname+'/views/index.html'));
});
app.get('/projects', (req, res) => {
res.redirect('/library');
});
app.get('/work', (req, res) => {
res.sendFile(path.join(__dirname+'/views/work.html'));
});
app.get('/tagpro', (req, res) => {
res.sendFile(path.join(__dirname+'/views/tagpro.html'));
});
app.get('/library', (req, res) => {
res.sendFile(path.join(__dirname+'/views/library.html'));
});
app.get('/fun', (req, res) => {
res.sendFile(path.join(__dirname+'/views/fun.html'));
});
app.get('/cluedo', (req, res) => {
res.sendFile(path.join(__dirname+'/views/cluedo.html'));
});
app.get('*', (req, res) => {
res.sendFile(path.join(__dirname+'/views/404.html'));
});
app.listen(3000, () => {
console.log('running running');
});