-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.js
More file actions
21 lines (15 loc) · 715 Bytes
/
server.js
File metadata and controls
21 lines (15 loc) · 715 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Set the 'NODE_ENV' variable
process.env.NODE_ENV = process.env.NODE_ENV || 'development';
// Load the module dependencies
//const configureMongoose = require('./server/config/mongoose');
const configureExpress = require('./server/config/express');
// Create a new Mongoose connection instance
//const db = configureMongoose();
// Create a new Express application instance
const app = configureExpress();
// Use the Express application instance to listen to the '3000' port
app.listen(3000);
// Log the server status to the console
console.log('Server running at http://localhost:3000/');
// Use the module.exports property to expose our Express application instance for external usage
module.exports = app;