THIS IS A DEMO STORE, ORDERS WILL NOT BE PROCESSED AND YOU WON'T BE CHARGED. U:Test P:funkytest111@

Environment variables

February 20, 2025

193 words | 1 min read.
DocumentationSetup.envAPIConfigurationSecretsSecurity
xtelegramfacebooktiktoklinkedin

You need to obtain and configure each of the environment variables, that define Your configuration between the required services:

There are 2 configuration files one for production and one for development + additional configuration should be done via netlify .env service – learn more here.

Each of those files has the following contents:

.env


GATSBY_PROJECT_NAME="superfunky"
FRONTEND_DOMAIN=superfunky.pro
BACKEND_DOMAIN=wp.superfunky.pro
WPGRAPHQL_URL=https://wp.superfunky.pro/graphql
PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_XXX
STRIPE_SECRET_KEY=sk_test_XXX
STRIPE_WEBHOOK_SECRET=whsec_XXX
STRIPE_ID=acct_XXX
MG_API_KEY=XXX

.env.development

Note the test Stripe keys and localhost url, the rest remain unchanged


GATSBY_PROJECT_NAME="superfunky"
FRONTEND_DOMAIN=superfunky.pro
BACKEND_DOMAIN=wp.superfunky.pro
WPGRAPHQL_URL=https://wp.superfunky.pro/graphql
PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_XXX
STRIPE_SECRET_KEY=sk_test_XXX
STRIPE_WEBHOOK_SECRET=whsec_XXX
STRIPE_ID=acct_XXX
MG_API_KEY=XXX

Explanations

Each key corresponds to the required service and is responsible for communication between them.

  • GATSBY_PROJECT_NAME – Your company’s name
  • FRONTEND_DOMAIN – Your gatsby site’s domain or subdomian
  • BACKEND_DOMAIN – Your wordpress backend’s domain or subdomain
  • WPGRAPHQL_URL – backend graphql api endpoint, can be setup in plugin’s settings.
  • PUBLIC_STRIPE_PUBLISHABLE_KEY – Stripe public key
  • STRIPE_SECRET_KEY – Stripe secret key
  • STRIPE_WEBHOOK_SECRET – Stripe webhook secret
  • STRIPE_ID – Stripe account ID
  • MG_API_KEY – Mailgun API key for Autoresponders

Additional notes on using ENV variables in JSX for mapping of variables

https://chatgpt.com/share/680be648-cbbc-8007-8464-fa9937ec9503


George

Written by George – The theme author, a passionate coder and web developer with years of experience, whose expertise led to the creation of superfunky theme and other various creative IT projects including WordPress plugins and headless, highly complex websites as well as code for custom business solutions and digital arts.

Leave a review

No reviews yet.

Drop us a message

We crate delightful web development projects that stand out with their architecture, design, content and performance.

Stay up to date with our progress.

25 / 7

Tailwind

Tailwind

Swiper

Swiper

Stripe

Stripe

Woo

Woo

WordPress

WordPress

React

React

Gatsby

Gatsby

Netlify

Netlify

Node

Node

PHP

PHP

Github

Github

GA4

GA4

Cookie Consent
We inform you that uses cookies for the proper functioning of our website, as well as for analytical and advertising purposes. Learn more about how we use cookies in our Privacy Policy.