title: How to use nodemon/grunt with .env files?
body: <p>I am using an <code>.env</code> file to work with foreman, but am trying to configure nodemon to start my server using grunt, because I enjoy how nodemon restarts when files become modified.</p>
  
  <p>I am trying avoid having an <code>.env</code> file for foreman AND having environment variables stored in my <code>~/.bash_profile</code> for nodemon. Instead, I would like to configure my <code>.env</code> file to work for both cases. </p>
  
  <p>I found some answers <a href="https://stackoverflow.com/questions/10560241/how-to-use-nodemon-with-env-files">here</a>, and the <a href="https://stackoverflow.com/a/11962552">second answer</a> should work for grunt.</p>
  
  <p>My <code>.env</code> file is of JSON format, which should flatten environment variables via concatenation (see <a href="https://github.com/NodeFly/node-foreman" rel="nofollow noreferrer">here</a>). </p>
  
  <p>When I run the following command <code>$ env $(cat .env) nodemon app.js</code>, I receive the following error: <code>env: {: No such file or directory</code>.</p>
  
  <p>Anyone have an idea of what the problem may be? Cheers.</p>