-
Notifications
You must be signed in to change notification settings - Fork 0
/
server.js
35 lines (26 loc) · 1.19 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
const express = require('express');
const app = express();
app.use("/js", express.static(__dirname + '/js'))
app.use("/css", express.static(__dirname + '/css'))
app.use("/leaflet", express.static(__dirname + "/node_modules/leaflet/dist"));
app.use('/jquery', express.static(__dirname + '/node_modules/jquery/dist'));
app.use('/turf', express.static(__dirname + '/node_modules/@turf/turf'));
app.use('/bootstrap', express.static(__dirname + '/node_modules/bootstrap/dist'));
app.use('/typeahead', express.static(__dirname + '/node_modules/corejs-typeahead/dist'));
app.use('/markers', express.static(__dirname + '/node_modules/leaflet.awesome-markers/dist'));
app.use('/chart.js', express.static(__dirname + '/node_modules/chart.js/dist'));
app.use("/data", express.static(__dirname + '/data'))
app.use("/private", express.static(__dirname + '/private'))
app.get('/', (req, res) => {
res.sendFile(__dirname + '/Map.html')
})
app.get('/howto', (req, res) => {
res.sendFile(__dirname + '/HowTo.html')
})
app.get('/imprint', (req, res) => {
res.sendFile(__dirname + '/imprint.html')
})
const port = 3000;
app.listen(port,
() => console.log(`Example app listening at http://localhost:${port}`)
)