This object contains the controllers, models, services and configurations contained in the
This object contains APIs contained in the
And by using
strapi.api[:name] you can access the controllers, services, the model definition and also the configurations of the
Returns the Koa instance.
Promise. When resolved, it means that the
./config/functions/bootstrap.js has been executed. Otherwise, it throws an error.
You can also access to the bootstrap function through
./config folder will be parsed into the
./api/**/controllers folder will be parsed into the
strapi.controllers object. Thanks to this object, you can access to every controller's actions everywhere in the project.
This object doesn't include the admin's controllers and plugin's controllers.
Returns an object of the hooks available in the project. Every folder that follows this pattern
strapi-* and located in the
/hooks folder will be mounted into the
Returns an object of the Koa middlewares found in the
./node_modules folder of the project. This reference is very useful for the Strapi's core.
Returns a function that parses the configurations, hooks, middlewares and APIs of your app. It also loads the middlewares and hooks with the previously loaded configurations. This method could be useful to update references available through the
strapi global variable without having to restart the server. However, without restarting the server, the new configurations will not be taken in account.
Returns the Logger (Pino) instance.
Returns an object of the middlewares available in the project. Every folder in the
./middlewares folder will be also mounted into the
./api/**/models folders will be parsed into the
strapi.models object. Also every
strapi.models.** object is merged with the model's instance returned by the ORM (Mongoose, Bookshelf). It allows to call the ORM methods through the
strapi.models.** object (ex:
Returns an object of plugins available in the project. Each plugin object contains the associated controllers, models, services and configurations contained in the
Returns a function that will returns the available queries for this model. This feature is only available inside the plugin's files (controllers, services, custom functions). For more details, see the [ORM queries section](../plugin-development/backend-development.md#ORM queries).
Returns a function that reloads the entire app (with downtime).
Returns the Router (Joi router) instance.
./api/**/services folders will be parsed into the
Returns a function that loads the configurations, middlewares and hooks. Then, it executes the bootstrap file, freezes the global variable and listens the configured port.
Returns a function that shuts down the server and destroys the current connections.
Returns a set of utils.