-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
31 lines (24 loc) · 797 Bytes
/
index.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
const express = require('express');
const app = express();
const nunjucks = require('nunjucks');
const port = process.env.PORT || 5000;
nunjucks.configure(__dirname + '/views', {
autoescape: true,
express: app
});
app.set('view engine', 'html');
app.use(express.static(__dirname + '/views/styles'));
app.get('/', (req, res) => res.render('index'));
const timestamp = require('./timestamp');
const whoami = require('./whoami');
const shorten = require('./shorten');
const imageSearch = require('./image-search');
const filesize = require('./filesize');
app.use('/timestamp', timestamp);
app.use('/whoami', whoami);
app.use('/shorten', shorten);
app.use('/image-search', imageSearch);
app.use('/filesize', filesize);
app.listen(port, () => {
console.log('Listening on port', port);
});