forked from walteryu/ndoch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
24 lines (18 loc) · 572 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
var express = require('express');
var app = express();
app.set('port', (process.env.PORT || 5000));
app.use(express.static(__dirname + '/public'));
// views is directory for all template files
app.set('views', __dirname + '/views');
app.set('view engine', 'ejs');
// Homepage route
app.get('/', function(request, response) {
response.render('pages/index');
});
// Map route
app.get('/map', function(request, response) {
response.render('pages/map');
});
app.listen(app.get('port'), function() {
console.log('Node app is running on port', app.get('port'));
});