I use loopback without a strongloop frame, that is, I do not have access to any of the cli tools. I can successfully create and start the loopback server and define / load some models this way:
var loopback = require('loopback');
var app = loopback();
var dataSource = app.dataSource
(
'db',
{
adapter : 'memory'
});
);
var UserModel = app.loopback.findModel('User');
UserModel.attachTo(dataSource);
app.model(UserModel);
app.use('/api', app.loopback.rest());
What I would like to achieve is the ability to disconnect the model from the loopback application at runtime, so it is not available from the rest of the API or loopback object (without having to restart the node script).
I know that you can remove the model definition made earlier from cli:
Destroy the model in loopback.io , but this is not valid in my case, since it does this to remove the json objects loaded when strongloop loads, and this does not apply here.
, API-.