{ sailsit }

Sails Js Tutorials for Beginners and Forum

Have a Question?

If you have any question you can ask below or enter what you are looking for!

All posts tagged promise

Custom Promise

In sails we can write a custom promise, which can be used to convert any piece of code into promise Below is an example of writing custom promise function: getData() { return new Promise(function(resolve, reject){ Model.find().exec(function(err, result){ if(err) { reject(err); } resolve(result); }); }); }   In the above method, . . . Read more