Accessing gatsby env variables outside of gatsby - netlify-lambda #10813
Labels
stale?
Issue that may be closed soon due to the original author not responding any more.
type: question or discussion
Issue discussing or asking a question about Gatsby
I am trying to reach my gatsby env variables outside of gatsby. Use case is for running functions in a local environment on netlify-lambda
So this looks like
const stripe = require('stripe')(process.env.GATSBY_STRIPE_SECRET_KEY);
This currently works on production on netlify, but i can get it to work locally. Any ideas on how i can expose my variables locally?
Environment (if relevant)
-->
File contents (if changed)
gatsby-config.js
: N/Apackage.json
: N/AThe text was updated successfully, but these errors were encountered: