我无法在sailsjs中获得政策。
我一遍又一遍地在同一个地方
最简单的
1)我发布了新的testProject 2)我在config下添加文件夹策略 3)我在文件夹下添加了isAuthenticated.js
A hook (`userconfig`) failed to load!
sails lift --verbose
info: Starting app...
verbose: Setting Node environment...
verbose: Please run `npm install coffee-script` to use coffescript (skipping for now)
verbose: moduleloader hook loaded successfully.
verbose: Loading app config...
error: A hook (`userconfig`) failed to load!
verbose: Lowering sails...
verbose: Shutting down socket server...
verbose: Shutting down HTTP server...
error: Error: Invalid module:function isAuthenticated(req, res, next) {
if (req.isAuthenticated()) {
return next();
}
else{
return res.redirect('/login');
}
}