This article is for LoopBack 2.x, which is no longer supported. Please see the corresponding article for 3.x.

Using MongoLab

Edit this page
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.


AltStyle によって変換されたページ (->オリジナル) /