Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 542
Manuel López Avatar asked Nov 20 '25 20:11

Manuel López


1 Answers

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.

like image 81
Jay Motka Avatar answered Nov 22 '25 08:11

Jay Motka



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!