Skip to content

Commit 583dd4c

Browse files
committed
LLMs-full update
1 parent f13c19c commit 583dd4c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docusaurus/static/llms-full.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7096,6 +7096,8 @@ It can be used to:
70967096

70977097
`register()` is the very first thing that happens when a Strapi application is starting. This happens _before_ any setup process and you don't have any access to database, routes, policies, or any other backend server elements within the `register()` function.
70987098

7099+
You can use `register()` to front-load security tasks such as loading secrets, rotating API keys, or registering authentication providers before the app finishes initializing.
7100+
70997101
## Bootstrap
71007102

71017103
The `bootstrap` lifecycle function, found in `./src/index.js` (or in `./src/index.ts`), is called at every server start.
@@ -7108,6 +7110,8 @@ It can be used to:
71087110

71097111
The `bootstrap()` function is run _before_ the back-end server starts but _after_ the Strapi application has setup, so you have access to anything from the `strapi` object.
71107112

7113+
You can use `bootstrap()` to support editorial workflows, for example by seeding starter content, attaching webhooks, or scheduling cron jobs at startup.
7114+
71117115
:::tip
71127116
You can run `yarn strapi console` (or `npm run strapi console`) in the terminal and interact with the `strapi` object.
71137117
:::
@@ -7121,6 +7125,8 @@ It can be used to gracefully:
71217125
- stop [services](/cms/backend-customization/services) that are running
71227126
- [clean up plugin actions](/cms/plugins-development/server-api#destroy) (e.g. close connections, remove listeners, etc.)
71237127

7128+
You can use `destroy()` to handle operational clean-up, such as closing database or queue connections and removing listeners so the application can shut down cleanly.
7129+
71247130
:::tip
71257131
All 3 lifecycle functions can be put together to configure custom behavior during application startup and shutdown.
71267132

0 commit comments

Comments
 (0)