-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathserver.js
More file actions
24 lines (19 loc) · 786 Bytes
/
server.js
File metadata and controls
24 lines (19 loc) · 786 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
'use strict';
// Initialize server ===========================================================
var express = require('express')
, http = require('http')
, app = express()
, server = http.createServer(app)
, port = process.env.PORT || 3000;
// Configuration ===============================================================
app.set('views', __dirname + 'public/views');
app.use(express.static(__dirname + '/public'));
app.use(express.bodyParser());
// Routes ======================================================================
require('./config/routes.js')(app);
// New relic.
// require('newrelic');
// Listen (start app with node server.js) ======================================
server.listen(port, function() {
console.log("App is now listening on port " + port);
});