-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
35 lines (26 loc) · 873 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
28
29
30
31
32
33
34
35
// DEPENDENCIES
// ============
require('./server/config/config');
var express = require("express"),
http = require("http"),
port = (process.env.PORT || 8001),
server = module.exports = express();
// SERVER CONFIGURATION
// ====================
server.configure(function () {
server.use(express.logger());
server.use(express["static"](__dirname + "/public"));
server.use(express.bodyParser());
server.use(express.methodOverride());
server.use(server.router);
server.use(express.errorHandler({
dumpExceptions:true,
showStack:true
}));
});
require('./server/config/routes')(server);
// SERVER
// ======
// Start Node.js Server
http.createServer(server).listen(port);
console.log('Welcome to Marionette-Require-Boilerplate!\n\nPlease go to http://localhost:' + port + ' to start using Require.js and Marionette');