Skip to content

Commit

Permalink
Merge pull request #5 from strapi/chore/update-readme-prerequisites
Browse files Browse the repository at this point in the history
Chore/update readme prerequisites
  • Loading branch information
Mcastres authored Sep 26, 2024
2 parents 4d2cf40 + 29be38f commit f01a146
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@ Strap yourself in! You can get started with this project on your local machine b

Before you take off, make sure you have the right env variables loaded for each part (rocket science at its best):

- Strapi (example in `./strapi/.env.example`):
Strapi (example in `./strapi/.env.example`):
- `STRAPI_ADMIN_CLIENT_URL=<url-of-nextjs>`
- `STRAPI_ADMIN_CLIENT_PREVIEW_SECRET=<a-random-token>`

- Next.js (already in `./next/.env`):
- `NEXT_PUBLIC_API_URL=<url-of-strapi>`
- Create a `./strapi/.env` file with these variables

Next.js (example in `./next/.env.sample`):
- `NEXT_PUBLIC_API_URL=<url-of-strapi>` (mandatory)
- `PREVIEW_SECRET=<the-same-random-token-as-for-strapi>`

- Create a `./next/.env` file with these variables

## 1. Clone Launchpad

To infinity and beyond! 🚀 Clone the repo with this command:
Expand Down
3 changes: 3 additions & 0 deletions next/.env.sample
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
WEBSITE_URL=http://localhost:3000 # Add the correct ENV var for this onto your hosting platform, point it to your production website.
PORT=3000

NEXT_PUBLIC_API_URL=url-of-strapi
PREVIEW_SECRET=the-same-random-token-as-for-strapi
3 changes: 3 additions & 0 deletions strapi/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ API_TOKEN_SALT=tobemodified
ADMIN_JWT_SECRET=tobemodified
TRANSFER_TOKEN_SALT=tobemodified
JWT_SECRET=tobemodified

STRAPI_ADMIN_CLIENT_URL=url-of-nextjs
STRAPI_ADMIN_CLIENT_PREVIEW_SECRET=a-random-token

0 comments on commit f01a146

Please sign in to comment.