As we all know sails.js is built over node.js and express.js. We can write modules for node.js and then include them in our sails projects.. Here is a beautiful tutorial on how to write and publish node modules..