title: How to programmatically write a value to a variable in my .env file?
body: <p>So for my Node.js app I created a seed script that can be called from the command line.
  This creates a user and a password based on a JWT secret.
  When running the script I want the secret to be a custom generated string and write it to the <code>APP_SECRET</code> variable in my <code>.env</code> file.
  Is there any way to programmatically fill the variable with this custom string in the <code>.env</code> file?</p>