node.js - Sails JS new response in WebStorm -


i'm newbie in sails js.. i'm trying create new custom response, didn't find auto-generator created manually.

//somename.js     module.exports = function somename(data, options) {     console.log('test'); }; 

i'm trying access response controller:

//somecontroller.js module.exports = {     somecontroller: function(req, res) {         res.somename();     } } 

the problem webstorm isn't recognize response..

unresolved function or method somename.

but when executing app-it's working..(webstorm recognize default responses came 'sails new someapp').

thanks help!

the code in sails.js library loads custom responses this:

files = getfilesinapiresponsesdirectory() files.foreach(function(file) {   name = extractname(file);   res[name] = require(file); // <-- dynamic infer @ point }) 

there no way webstorm code analyzer infer relationship between res , custom response function without running sails.js code or receiving (less dynamic, more explicit) hint.

anyway, message got not represent critical error, it's "code inspection" can disable or suppress.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -