-
Notifications
You must be signed in to change notification settings - Fork 7
/
app.js
29 lines (22 loc) · 863 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
// -- Module dependencies.
var express = require('express'),
http = require('http'),
logo = require('./lib/logo'),
color = require('colors');
// -- Create Express instance and export
var app = express(),
env = app.settings.env,
// -- Import configuration
conf = require('./settings/config'),
settings = conf.settings;
conf (app, express, env);
// -- Bootstrap Config
require('./bootstrap').boot(app);
// -- Routes
require('./routes/index')(app);
// -- Only listen on $ node app.js
logo.print();
http.createServer(app).listen(settings.port, function(){
console.log("Express server listening on "+" port %d ".bold.inverse.red+" in " + " %s mode ".bold.inverse.green + " //", settings.port, env);
console.log('Using Express %s...', express.version.red.bold);
});