-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
58 lines (42 loc) · 1.1 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
var express = require('express');
var app = express();
var http = require('http');
var path = require('path');
app.engine('.html', require('ejs').__express);
app.use(express.static(path.join(__dirname, 'public')));
app.set('views', __dirname + '/views');
app.set('view engine', 'html');
app.get('/', function(req, res){
res.redirect('/signin');
});
app.get('/email', function(req, res){
res.render('email');
});
app.get('/friends', function(req, res){
res.render('friends');
});
app.get('/games', function(req, res){
res.render('games');
});
app.get('/account', function(req, res){
res.render('account');
});
app.get('/signin', function(req, res){
res.render('signin')
});
app.get('/profile', function(req, res){
res.render('profile')
});
app.get('/loan', function(req, res){
res.render('loan')
});
app.get('/requestGame', function(req, res){
res.render('requestGame')
});
app.get('/yourLoans', function(req, res){
res.render('yourLoans')
});
var port = Number(process.env.PORT || 4000);
app.listen(port, function() {
console.log("Listening on " + port);
});