Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment variable #63

Open
believelody opened this issue Mar 12, 2021 · 1 comment
Open

Environment variable #63

believelody opened this issue Mar 12, 2021 · 1 comment

Comments

@believelody
Copy link

Hi, I've just discovered your library and it's awesome. I come from frontend world so I don't know so much about wordpress and php. I want to use environment variables. In a standalone react app, I've just to create a .env file at root folder and set a variable prefixed by REACT_APP_. How can I do it with your react theme within wordpress app ? The standalone way doesn't work.

@sanion
Copy link

sanion commented Sep 28, 2023

Hi @believelody . I was also thinking about this issue and I think the best way to archive this would be in the backend, with php and send all your data with api to the front end. Here is good article :
https://erikpoehler.com/2020/12/30/using-an-env-file-for-database-and-other-credentials/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants