I want to add some values to .env in my project during runtime. Is there any code to do this?
You can set them like you would any variable e.g.
process.env.VAR='value'. Note though that it’s just temporary - the values are forgotten or reset to what’s in .env when your project restarts.
Is there a way to store them permanently?