Is it possible to use models defined within [app-name]/api/models
outside api
folder?
I have created separate folder in application root,
If your concern with using sails.lift
is that it starts an actual HTTP server that listens for requests, you can use sails.load
instead. It will do everything that lift
does--including loading hooks and models--except for starting the server.
var Sails = require('sails');
Sails.load(function(err, sails) {
// At this point you have access to all your models, services, etc.
});