Proof of concept
Experimental node module for sails v0.10 that provide modular MVC organization of the code. Be very carefully with this code as sails changes very fast these days and as I'm comitting the code is already outdated.
to make it work with version SHA1 98188d3440b2610e6dc5920ef8894b1b9397b813:
-
add this node package to
packaje.json
("sails-apps") from git and install it -
in
app.js
replacesails.lift();
withrequire('sails-apps').lift(sails);
-
in
api/blueprints
replacevar Model = sails.models[req.options.model];
withvar Model = (req.options.appId === "") ? sails.models[req.options.model] : sails.apps[req.options.appId].models[req.options.model];
-
Good luck, you'll need it