Search code examples
reactjsenvironment-variablesdotenv

How to add an variable in .env file which contain #?


I want to define KEY=qwerty#1234 in .env file in create-react-app but it ignores everything after #. I have tried KEY="qwerty#1234" but it did not work. So, How can I assign this?

Actual variable in .env file:

API_END_POINT=/try/xyz_abc
ADMIN_KEY="Z3+{Ef/@pJ*Axc-WW`v5#RT45%<1:V(3"
API_SOMETHING=/xyz

Solution

  • # starts a comment

    add quotes -> KEY='qwerty#1234'