-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapp.js
27 lines (23 loc) · 765 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
var express = require('express'),
path = require('path'),
http = require('http'),
hbs = require('express-handlebars'),
story = require('./react/story'),
config = require('./config').story;
var app = express();
app.set('port', process.env.PORT || 80);
app.engine('html', hbs({
defaultLayout: 'layout',
layoutsDir: 'views',
extname: '.html'
}));
app.set('view engine', 'html');
app.disable('etag');
app.use("/", express.static(__dirname + "/public/"));
app.all('/', story.index);
['physics', 'events', 'donate', 'welcome'].forEach(function(e) {
app.get('/'+e, story[e]);
});
var server = http.createServer(app).listen(app.get('port'), function() {
console.log('Dreambuilder Webhook server listening on port ' + app.get('port'));
});