-
Notifications
You must be signed in to change notification settings - Fork 1
/
app.js
31 lines (24 loc) · 888 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
// -- 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);
require('./routes/signup')(app);
require('./routes/login')(app);
require('./routes/faq')(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);
});