我已经开始使用 CompoundJS 和 MongoDB 作为数据库。我知道我应该在 中进行主机配置/config/database.json
,但不确定如何为数据库配置添加用户名/密码。
我尝试添加如下用户名/密码,但它不起作用
{ "development":
{ "driver": "mongoose"
, "url": "mongodb://localhost/stats_development",
"username": "admin",
"password": "123456"
}
, "test":
{ "driver": "mongoose"
, "url": "mongodb://localhost/stats_test",
"username": "admin",
"password": "123456"
}
, "production":
{ "driver": "mongoose"
, "url": "mongodb://localhost/stats_production",
"username": "admin",
"password": "123456"
}
}