javascriptenvironment-variables

How to operate within.env file?(addition, multiplication)


I'm working on proyect with Nodejs. I work with .env file and I came up with a question.

I guees that I can't do this.

My .env file

#time in seconds

TOKEN_TIME_LIVE=(60*10)

How to operate on an .env file? Through what method can I do?

Sorry the ignorance and thanks for the help.


Solution

  • In .env file you can't use mathematical operations and can only store constant values and if you want to change it dynamically than you can change it in your project file by using any user defined function or any other method you can use to change the value of the constant by accessing the variable using process.env.TOKEN_TIME_LIVE.

    I'm sure it would help solve your question, In case I'm wrong any where please correct me and clear my misconception.