# API reference
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.
./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 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 within the project. Each plugin object contains the associated controllers, models, services and configurations.
This utility function allows to bind models with query functions specific to each ORM (e.g:
For more details, see the Queries section.
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.