diff --git a/packages/starters/gatsby-blog/README.md b/packages/starters/gatsby-blog/README.md index 4c7bd96..b75bb1e 100644 --- a/packages/starters/gatsby-blog/README.md +++ b/packages/starters/gatsby-blog/README.md @@ -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 @@ -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! \ No newline at end of file +Enjoy this starter!