-
Notifications
You must be signed in to change notification settings - Fork 15
/
app.js
34 lines (26 loc) · 813 Bytes
/
app.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
const path = require('path')
const express = require('express')
const compression = require('compression')
const app = express()
const server = require('http').Server(app)
var dir = path.join(__dirname, 'public')
app.use(compression())
app.use('/villagers-required.html', (req, res) => {
res.redirect('/villagers-required/')
})
app.use('/build-order-helper.html', (req, res) => {
res.redirect('/build-order-helper/')
})
app.use('/civ-ranking.html', (req, res) => {
res.redirect('/civ-ranking/')
})
app.use('/unit-card.html', (req, res) => {
res.redirect('/civ-ranking/')
})
app.use('/wood-calc.html', (req, res) => {
res.redirect('/wood-calc/')
})
app.use(express.static(dir))
const port = process.env.PORT || 5000
server.listen(port)
console.log(`AOE2: DE tools app listening on port ${port}`)