strapi / LaunchPad

Official Strapi Demo application
108 stars 27 forks source link

Please clarify how this is configured? #14

Closed happyZxk closed 1 week ago

happyZxk commented 1 month ago

Fix

Strapi (example in ./strapi/.env.example):

STRAPI_ADMIN_CLIENT_URL=<url-of-nextjs>

STRAPI_ADMIN_CLIENT_PREVIEW_SECRET=<a-random-token>

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

image image
Mcastres commented 1 week ago

Hello @happyZxk 👋

It's simple, based on what you sent, this how it should look like:

./strapi/.env

STRAPI_ADMIN_CLIENT_URL=http://localhost:3000
STRAPI_ADMIN_CLIENT_PREVIEW_SECRET=43fsdfu2f912340j4314f32fn9f3

./next/.env

NEXT_PUBLIC_API_URL=http://localhost:1337
PREVIEW_SECRET=43fsdfu2f912340j4314f32fn9f3