diff --git a/README.md b/README.md index 590b5bf..03cb988 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 (example in `./next/.env.sample`): + - `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