with-dotenv
i have followed this with-dotenv example and it works as expected fist time then i did a change on the .env file but it seems the first values of .env is still loaded
Steps to reproduce the behavior, please provide code snippets or a repository:
to see the new values of variable which is [email protected]
Try rm -rf node_modules/.cache
is pm2 restarting the process entirely when you make changes to your .env file? dotenv will not overwrite existing values in process.env so it needs a fresh process for you to see your changes
@timneutkens you are close enough if i delete my node_modules and re install them then building the app once again and run it through pm2 it reloads the .env variables
but i have no idea why does it cache and i don't think this is the solution to go but at least it is a work around
i don't think this is the solution to go but at least it is a work around
That's why I added the labels instead of closing immediately 馃槃
Most helpful comment
Try
rm -rf node_modules/.cache