-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathserver.js
More file actions
executable file
·40 lines (28 loc) · 1019 Bytes
/
server.js
File metadata and controls
executable file
·40 lines (28 loc) · 1019 Bytes
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
32
33
34
35
36
37
'use strict';
/***********************************
* www.js is a file from where our *
* server is running **************
***********************************/
let www = require('./bin/www.js');
/***********************************
* dbConnection.js is a file from **
* where we are connecting our *****
* mongodb database **************
***********************************/
let db = require('./bin/dbConnection.js');
/***********************************
* dbConfig.js is a file from we ***
****** are getting mongodb ********
********* configurations **********
***********************************/
let dbConfig = require('./server/config/dbConfig');
/***********************************
* Database conectinvity before ****
***** running server (www()) ******
***********************************/
db(dbConfig.mongodb.url).then(resolve => {
console.log(`*********DB is connected successfully*********`);
www();
}).catch(err => {
console.log(`*********err********* ${err}`);
});