Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Update README.md #92

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions packages/starters/gatsby-blog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,18 @@ yarn create strapi-starter my-project gatsby-blog
npx create-strapi-starter my-project gatsby-blog
```

The CLI will create a monorepo, install dependencies, and run your project automatically.
The CLI will create a monorepo, install dependencies, and run your project automatically. However, this will fail for the first time. You will need to manually create a full access [API token](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/optional/api-tokens.html) in Strapi. Once it's created, save it as `STRAPI_TOKEN` in your environment variables.

The Gatsby frontend server will run here => [http://localhost:3000](http://localhost:3000)
1. Start Strapi backend alone executing `yarn develop` in `./backend`
2. Go to Settings -> API Tokens and create a new full access token
3. Copy `.env` file for gatsby: `cp ./frontend/.env.example ./frontend/.env.development`
4. Adjust `STRAPI_TOKEN=...` in this file

The Strapi backend server will run here => [http://localhost:1337](http://localhost:1337)
After that, you can run `yarn develop` in the project's root folder (or in `./frontend` to run the Gatsby frontend alone).

The Gatsby frontend server will run here => [http://localhost:8000](http://localhost:8000)

You will however need to manually create a full access [API token](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/optional/api-tokens.html) in Strapi. Once it's created, save it as `STRAPI_TOKEN` in your environment variables.
The Strapi backend server will run here => [http://localhost:1337](http://localhost:1337)

## Deploying to production

Expand All @@ -33,4 +38,4 @@ You will need to deploy the `frontend` and `backend` projects separately. Here a
- [Deploy Strapi](https://strapi.io/documentation/developer-docs/latest/setup-deployment-guides/deployment.html#hosting-provider-guides)
- [Deploy Gatsby](https://www.gatsbyjs.com/docs/deploying-and-hosting/)

Enjoy this starter!
Enjoy this starter!