Private functions in Sails.js
This blog post was originally published a little while ago. Please consider that it may no longer be relevant or even accurate.
In modern frameworks you are usually able to define controller functions as being public or private, indicating whether or not they are callable from the browser. You might use private functions to encapsulate certain functionality or just to keep certain parts of your application inaccessible from the public. In Sails.js, it isn't as clear as it might be elsewhere as to how to create private functions.
Now you can implement private functions in your own Sails.js controllers!