add name of the database or a test database is created
This commit is contained in:
parent
d473b36291
commit
dff5bd01e0
1 changed files with 1 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
|||
const config = require('./config');
|
||||
const mongoose = require( 'mongoose' );
|
||||
const url = config.mongodbHost;
|
||||
const url = config.mongodbHost+config.mongodbDatabase;
|
||||
|
||||
mongoose.connect(url,({useNewUrlParser: true, useUnifiedTopology: true})).then( function(){
|
||||
console.log('mongodb-message connected '+mongoose.connection.readyState);
|
||||
|
|
@ -8,7 +8,6 @@ mongoose.connect(url,({useNewUrlParser: true, useUnifiedTopology: true})).then(
|
|||
console.log('error : '+err);
|
||||
});
|
||||
|
||||
|
||||
const schemaMessage = mongoose.Schema({
|
||||
username:{
|
||||
type: String,
|
||||
|
|
|
|||
Reference in a new issue