From 734d4cdb7105fa37cd0cd7a929b651e2bec0fa45 Mon Sep 17 00:00:00 2001 From: Maxime Castres Date: Thu, 26 Sep 2024 10:48:43 +0200 Subject: [PATCH 1/2] Update: README.md prerequisites --- README.md | 10 +++++++--- next/.env.sample | 3 +++ strapi/.env.example | 3 +++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 590b5bf..ae8bca0 100644 --- a/README.md +++ b/README.md @@ -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=` - `STRAPI_ADMIN_CLIENT_PREVIEW_SECRET=` -- Next.js (already in `./next/.env`): - - `NEXT_PUBLIC_API_URL=` +- Create a `./strapi/.env` file with these variables + +Next.js (already in `./next/.env`): + - `NEXT_PUBLIC_API_URL=` (mandatory) - `PREVIEW_SECRET=` +- Create a `./next/.env` file with these variables + ## 1. Clone Launchpad To infinity and beyond! 🚀 Clone the repo with this command: diff --git a/next/.env.sample b/next/.env.sample index d497db3..62310fb 100644 --- a/next/.env.sample +++ b/next/.env.sample @@ -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 \ No newline at end of file diff --git a/strapi/.env.example b/strapi/.env.example index ebfc96a..662def2 100644 --- a/strapi/.env.example +++ b/strapi/.env.example @@ -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 \ No newline at end of file From 29be38f390f06bba00cf7980c41a6f4c55e35050 Mon Sep 17 00:00:00 2001 From: Maxime Castres Date: Thu, 26 Sep 2024 10:49:11 +0200 Subject: [PATCH 2/2] Update: README.md prerequisites --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ae8bca0..03cb988 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Strapi (example in `./strapi/.env.example`): - Create a `./strapi/.env` file with these variables -Next.js (already in `./next/.env`): +Next.js (example in `./next/.env.sample`): - `NEXT_PUBLIC_API_URL=` (mandatory) - `PREVIEW_SECRET=`