-
Notifications
You must be signed in to change notification settings - Fork 1
Boot
Tyler Swayne edited this page Feb 6, 2021
·
2 revisions
The boot file, optionally located at ./src/config/boot.js
, is a way to "bootstrap" your application before the server is started. The file must export a method that takes the config & logger:
// ./src/config/boot.js
module.exports = (config, logger) => {
require('./cache').ensureWarm()
console.log("All booted up!")
}
This method can be async or plain old synchronous and is run before almost every other part of the application. If you don't need to run logic at startup, you can omit this file.