jazzaeromax
jazzaeromax

Reputation: 1

Environment variables in bit.dev

I am using bit dev for microfrontend solution in my project and I want to use environment variables in my project but, when I tried the traditional approach of .env file it is not working and even there is nothing in their documentation, I am confused on how to use it.

I tried creating a .env file then adding my environment variables but that is not working at all, i am using reactjs for my project.

Upvotes: 0

Views: 95

Answers (1)

Nitsan Cohen
Nitsan Cohen

Reputation: 697

If you want to add the variable on your local machine you have to export it to the terminal. For example (Mac):

export NETLIFY_AUTH_TOKEN="abcdefg"

You can add it to the zshrc file if you want it to always be available.

If you need the var on bit.cloud (Ripple) you can add it as a secret in your org config. Same goes for GitHub.

Upvotes: 0

Related Questions