-
Notifications
You must be signed in to change notification settings - Fork 130
/
app.js
40 lines (31 loc) · 885 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
35
36
37
38
39
40
const express = require('express');
const path = require('path');
const app = express();
const port = process.env.PORT || 3000;
app.use(express.static('public'));
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'pug');
app.get('/', function (req, res) {
res.render('index', {title: 'Conclave'});
});
app.get('/about', function (req, res) {
res.render('about', {title: 'About'});
});
app.get('/bots', function(req, res) {
res.render('bots', {title: 'Talk to Bots'});
});
app.get('/idLength', function (req, res) {
res.render('idGraph');
});
app.get('/opTime', function (req, res) {
res.render('timeGraph');
})
app.get('/arraysGraph', function (req, res) {
res.render('arraysGraph');
})
var srv = app.listen(port, function() {
console.log('Listening on '+port)
})
app.use('/peerjs', require('peer').ExpressPeerServer(srv, {
debug: true
}))