Reputation: 181
Is it possible to hide the API key while at the same time allowing other contributors to use it while in development?
I'm using Nextjs
Upvotes: 0
Views: 180
Reputation: 1
We can hide our api_key inside .env
file.
inside .env
USER_ID=239482`
getting api key insde other file
process.env.USER_ID; //239482
you can also read form here https://nodejs.dev/en/learn/how-to-read-environment-variables-from-nodejs/
Upvotes: 0