mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-01-17 21:02:22 +01:00
30 lines
662 B
JavaScript
Executable File
30 lines
662 B
JavaScript
Executable File
'use strict';
|
|
/**
|
|
* Module dependencies.
|
|
*/
|
|
var init = require('./config/init')(),
|
|
config = require('./config/config'),
|
|
mongoose = require('mongoose');
|
|
|
|
/**
|
|
* Main application entry file.
|
|
* Please note that the order of loading is important.
|
|
*/
|
|
|
|
// Bootstrap db connection
|
|
var db = mongoose.connect(config.db);
|
|
|
|
// Init the express application
|
|
var app = require('./config/express')(db);
|
|
|
|
// Bootstrap passport config
|
|
require('./config/passport')();
|
|
|
|
// Start the app by listening on <port>
|
|
app.listen(config.port);
|
|
|
|
// Expose app
|
|
exports = module.exports = app;
|
|
|
|
// Logging initialization
|
|
console.log('MEAN.JS application started on port ' + config.port); |