Whitelist which remote methods are automatically exposed through the api via a whitelist on the model.json definition file
npm install loopback-mixin-whitelist --save
Create your own mixin file in the server/mixins
directory (e.g. server/mixins/method-whitelist.js
)
The contents of the file should be:
module.exports = require('loopback-mixin-whitelist')
Then, in your model .json file, you can whitelist methods as:
"mixins": {
...
"MethodWhitelist": {
"expose": [
"findById"
]
}
}
```