- install the generator
$ npm install -g strongloop
- Scaffold out an app
$ slc loopback
- Add a model
slc loopback:model
- Remove remote Methods
{MODEL_NAME}.disableRemoteMethod("create", true);
- Create Relationships
slc loopback:relation
-
Docs for MongoDB connector
-
Add a DataSource
$ slc loopback:datasource
- Add Connector
$ npm install loopback-connector-mongodb
- Update models to use MongoDB (model-config.js)
-
Base url for your API (config.json)
-
Change the JSON file to JS and add
production
ordevelopment
to the file eg.config.development.js
and then export an object.
- Serving Static
"files": {
"loopback#static": {
"params": "$!../client"
}
}