mirror of
https://github.com/strapi/strapi.git
synced 2025-11-08 22:32:02 +00:00
docs: update way to create strapi app in deployment guide
By following a feedback on a Spectrum question, I updated the way to create the strapi app to respect the best practice. It will prevent global version issue.
This commit is contained in:
parent
e20ed1b1fd
commit
ba3586fbe7
@ -62,7 +62,9 @@ NODE_ENV=production npm run build
|
|||||||
```bash
|
```bash
|
||||||
npm install cross-env
|
npm install cross-env
|
||||||
```
|
```
|
||||||
|
|
||||||
Then in your `package.json` scripts section:
|
Then in your `package.json` scripts section:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
"production": "cross-env NODE_ENV=production npm run build"
|
"production": "cross-env NODE_ENV=production npm run build"
|
||||||
```
|
```
|
||||||
@ -96,7 +98,9 @@ NODE_ENV=production npm start
|
|||||||
```bash
|
```bash
|
||||||
npm install cross-env
|
npm install cross-env
|
||||||
```
|
```
|
||||||
|
|
||||||
Then in your `package.json` scripts section:
|
Then in your `package.json` scripts section:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
"production": "cross-env NODE_ENV=production npm start"
|
"production": "cross-env NODE_ENV=production npm start"
|
||||||
```
|
```
|
||||||
@ -1340,10 +1344,30 @@ If you plan to use **MongoDB** with your project, [refer to the create a Strapi
|
|||||||
|
|
||||||
`Path: ./`
|
`Path: ./`
|
||||||
|
|
||||||
|
:::: tabs
|
||||||
|
|
||||||
|
::: tab yarn
|
||||||
|
|
||||||
|
Use **yarn** to install the Strapi project (**recommended**). [Install yarn with these docs](https://yarnpkg.com/lang/en/docs/install/)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
strapi new my-project --quickstart
|
yarn create strapi-app my-project --quickstart
|
||||||
```
|
```
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
|
::: tab npx
|
||||||
|
|
||||||
|
Use **npm/npx** to install the Strapi project
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npx create-strapi-app my-project --quickstart
|
||||||
|
```
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
|
::::
|
||||||
|
|
||||||
::: tip
|
::: tip
|
||||||
When you use `--quickstart` to create a Strapi project locally, a **SQLite database** is used which is not compatible with Heroku. Therefore, another database option [must be chosen](#_6-heroku-database-set-up).
|
When you use `--quickstart` to create a Strapi project locally, a **SQLite database** is used which is not compatible with Heroku. Therefore, another database option [must be chosen](#_6-heroku-database-set-up).
|
||||||
:::
|
:::
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user