the mongodb database doesn't exist after using lb4 datasource
to create a database connection in loopback4
#8808
-
I have use loopback4 to get an database connection with mongoDB datasource. I expect after I created the data source,then the datasource will exist in the mongoDB. this is my datasource file as follows: const config = {
name: 'echo3D2',
connector: 'mongodb',
url: 'mongodb://localhost:27017/echo3D2',
host: 'localhost',
port: 27017,
user: '',
password: '',
database: 'echo3D2',
useNewUrlParser: true
}; I think that means I have being successful in creating a database in MongoDB,which name is echo3D2. then when I check whether the database exist or not,I found the echo3D2database does not exist in MongoDB. as the follow show in mongoDB CLI input:
output:
there must be something wrong with it ! what should I do to solve the problem ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Solved in #8809 (comment). |
Beta Was this translation helpful? Give feedback.
Solved in #8809 (comment).