Exploring the project structure of a Strapi application
When we ran the strapi-app
CLI tool with yarn create strapi-app
, the command generated a new blank project for us. Let's spend some time exploring the structure of the project and the packages that were installed for us.
The commands to run Strapi
Out of the box, the package.json
file includes four Strapi-related commands that provide aliases for the Strapi CLI:
- Development mode: While developing, we will run the API using the
yarn develop
command. This is an alias forstrapi develop
, which runs the Strapi instance in development mode, enabling features such as auto-reload and writing files to the code base when we change options in the admin panel. It also builds the admin panel. - Production mode: For running in production, we can use
yarn start
(which is the alias forstrapi start
). This disables auto-reload and writing files into the code base. - Build the admin panel: The final command is
yarn build...