Home > Software design >  Fetching my key from an .env file and it is missing characters
Fetching my key from an .env file and it is missing characters

Time:08-03

I define PAYTM_KEY=Vkp%y6xcAImktc1P# in .env file.

but i get in colsole:- PAYTM_KEY: 'Vkp%y6xcAImktc1P'

why # is missing ?

CodePudding user response:

The # start a comment so you need to quote your ENV var, like this:

PAYTM_KEY="Vkp%y6xcAImktc1P#"

Without quote, the # char is interpreted as the beginning of a comment.

  • Related