-
Notifications
You must be signed in to change notification settings - Fork 0
/
web.js
53 lines (47 loc) · 1.36 KB
/
web.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
// Main entry point for the website.
var express = require('express');
var utils = {
getDriveImageUrl: function(filename) {
return 'https://googledrive.com/host/0B6vNk5GSBIjUWG9xNklsYnVGaHc/' + filename;
},
};
var app = express.createServer(express.logger());
app.configure(function() {
app.use(express.methodOverride());
app.use(express.bodyParser());
app.use(express.static(__dirname + '/public'));
app.register('.html', require('jade'));
app.use(express.errorHandler({
dumpExceptions: true,
showStack: true
}));
app.use(app.router);
});
app.get('/', function(request, response) {
response.render('home.html', {
banner: utils.getDriveImageUrl('homepage_banner.jpg'),
active: 'Home'
});
});
app.get('/bride-and-groom/', function(request, response) {
response.render('bride_and_groom.html', {
banner: utils.getDriveImageUrl('bride_and_groom_banner.jpg'),
active: 'Bride & Groom'
});
});
app.get('/wedding-party/', function(request, response) {
response.render('wedding_party.html', {
banner: utils.getDriveImageUrl('wedding_party.jpg'),
active: 'Wedding Party'
});
});
app.get('/photos/', function(request, response) {
response.render('photos.html', {
banner: utils.getDriveImageUrl('wedding_party.jpg'),
active: 'Photos'
});
});
var port = process.env.PORT || 5000;
app.listen(port, function() {
console.log('Listening on ' + port);
});