-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
53 lines (39 loc) · 1.39 KB
/
app.js
File metadata and controls
53 lines (39 loc) · 1.39 KB
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
43
44
45
46
47
48
49
50
51
52
53
var express = require('express');
var app = express();
var path = require('path');
app.use(express.static('external'));
app.use(express.static('styles'));
app.use(express.static('js'));
app.use(express.static(path.join(__dirname)));
app.use(express.static('directed-graph'));
app.get('/', function(req, res) {
res.sendFile(__dirname + '/index.html');
});
app.get('/home', function(req, res) {
res.sendFile(__dirname + '/home.html');
});
app.get('/store', function(req, res) {
app.use(express.static('/store'));
res.sendFile(__dirname + '/store/store.html');
});
app.get('/tutorial', function(req, res) {
app.use(express.static('/tutorial'));
res.sendFile(__dirname + '/tutorial/topic.html');
});
app.get('/magic', function(req, res) {
app.use(express.static('/all-units/magic'));
res.sendFile(__dirname + '/all-units/magic/topic.html');
});
app.get('/secrets', function(req, res) {
app.use(express.static('/all-units/secrets'));
res.sendFile(__dirname + '/all-units/secrets/topic.html');
});
app.get('/asciiart', function(req, res) {
app.use(express.static('/all-units/asciiart'));
res.sendFile(__dirname + '/all-units/asciiart/topic.html');
});
// app.get('/images/represent/asciiart', function(req, res) {
// app.use(express.static('linear-life/asciiart'));
// res.sendFile(__dirname + '/linear-life/asciiart/topic.html');
// });
app.listen(8080);