Page Contents

If you are using MongoLab to host your MongoDB database, use the LoopBack url property to configure your data source, since the connection string is dynamically generated.

For example, the entry in datasources.json might look like this: 

/server/datasources.json

"mongodb": {
  "defaultForType": "mongodb",
  "connector": "loopback-connector-mongodb",
  "url": "mongodb://localhost:27017/mydb"
}

For information on how to get your connection URI, see the MongoLab documentation.