Created
June 23, 2014 14:56
-
-
Save getchenge/af36a425e74203ece0ec to your computer and use it in GitHub Desktop.
the entrance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var express = require('express'); | |
/** | |
* Main application file | |
*/ | |
// Set default node environment to development | |
process.env.NODE_ENV = process.env.NODE_ENV || 'development'; | |
var config = require('./lib/config/config'); | |
// Setup Express | |
var app = express(); | |
require('./lib/config/express')(app); | |
require('./lib/routes')(app); | |
// Start server | |
app.listen(config.port, config.ip, function () { | |
console.log('Express server listening on %s:%d, in %s mode', config.ip, config.port, app.get('env')); | |
}); | |
// Expose app | |
module.exports = app; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment