Edit Page

sails.config.bootstrap

What is this?

#

sails.config.bootstrap is a customizable seed function that runs before your Sails app is lifted (i.e. starts up).

By convention, this function is used for:

For an example bootstrap function, generate a new Sails app and have a look at config/bootstrap.js.

Notes

#
  • Sails will log a warning if the bootstrap function is "taking too long". If your bootstrap function is taking longer to run than the default timeout of 30 seconds and you would like to prevent the warning from being displayed, you can stall it by configuring sails.config.bootstrapTimeout to a larger number of milliseconds. (For example, you can increase the timeout to one minute by using 60000.)

Is something missing?

If you notice something we've missed or could be improved on, please follow this link and submit a pull request to the sails repo. Once we merge it, the changes will be reflected on the website the next time it is deployed.

Reference

Reference