sails-context
v0.0.9
Published
Sails.js context loader, it preload context info and data in req.context
Downloads
2
Readme
sails-context
Sails.js context loader. This module preload data like current record, list count ... etc for use in others policies, controllers and views as req.context
Want to help? see: https://gist.github.com/albertosouza/81bfb2bea761b7b6f5fe
How it will work? ... a sails acl proposal ...
Link: https://gist.github.com/albertosouza/81bfb2bea761b7b6f5fe
Installation
npm install sails-context --save
Add it to your policies:
// file config/policies.js
var context = require('sails-context').sails.police;
module.exports.policies = {
'*': [context]
};
Credits
Alberto Souza and contributors