title: How to generate and set `JWT_SECRET` and `JWT_EXPIRATION_TIME` in express
body: <p>When I run my server,I suffered following errors.</p>
  <p><code>Error: Config validation error: &quot;JWT_SECRET&quot; is required. &quot;JWT_EXPIRATION_TIME&quot; is required</code></p>
  <p>Therefore I must set JWT secret key and so on.</p>
  <p>I'd like to know how to set <code>JWT_SECRET</code>.But I couldn't figure out how to generate and set them.</p>
  <p>I set<code>.env</code> file,I must configure some of variables in them.</p>
  <p>my<code>.env</code> file is like following.</p>
  <p><code>.env</code></p>
  <pre><code>JWT_SECRET=
  JWT_EXPIRATION_TIME=
  </code></pre>
  <p>If someone know good way to generate <code>SECRET</code> please let me know.</p>
  <p>Thanks</p>