-
Notifications
You must be signed in to change notification settings - Fork 0
/
server.js
31 lines (22 loc) · 850 Bytes
/
server.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
// Invoke 'strict' JavaScript mode
'use strict';
// Set the 'NODE_ENV' variable
process.env.NODE_ENV = 'development';
// Load the module dependencies
var mongoose = require('./config/mongoose'),
express = require('./config/express'),
passport = require('./config/passport');
// Create a new Mongoose connection instance
var db = mongoose();
// Create a new Express application instance
var app = express();
// // Start the agenda
var agenda = require('./config/agenda');
// Configure the Passport middleware
var passport = passport();
// Use the Express application instance to listen to the '3000' port
app.listen(8080);
// Log the server status to the console
console.log('Server running at http://localhost:8080/');
// Use the module.exports property to expose our Express application instance for external usage
module.exports = app;