I wrote the following example controller using Sails.js:
userController.js
module.exports = {
test: function(req, res){
console.log('test')
res.json('test')
}
};
When I run sails.js and send it to that route (user/test
), it appears to execute that code twice and outputs test
twice in my WebStorm debug window:
"test"
"test"
How do I keep Sails.js from executing the same code twice?