You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
348 B
10 lines
348 B
//Set up mongoose connection
|
|
console.log('in db config');
|
|
const mongoose = require('mongoose');
|
|
const mongoDB = 'mongodb://localhost/node_rest_api';
|
|
mongoose.connect(mongoDB);
|
|
mongoose.Promise = global.Promise;
|
|
|
|
module.exports = mongoose;
|
|
/*const db = mongoose.connection;
|
|
db.on('error', console.error.bind(console, 'MongoDB connection error:'));*/ |