sails.config.bootstrap
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
.
- 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 using60000
.)