title: How to run the node app in different port - as temporarily?
body: <p>In my app, I have the configuration like this:</p>
  
  <pre><code> module.exports = {
       'port': process.env.PORT || 8080,
       'database': 'mongodb://xxx:xxxx@ds013456.mlab.com:13456/practical',
       'secret': 'ilovescotchscotchyscotchscotch'
   };
  </code></pre>
  
  <p>but at present, I would like to run my app in different PORT number say, <code>8081</code> or something else. because I need to run 2 different apps which is configured as same way.</p>
  
  <p>what is the correct way? - any one help me?</p>
  
  <p>Thanks in advance.</p>
  
  <p>I tried this answer already : <a href="https://stackoverflow.com/questions/13333221/how-to-change-value-of-process-env-port-in-node-js">How to change value of process.env.PORT in node.js?</a></p>
  
  <p>But I am getting this error: ( I am using windows shell )</p>
  
  <pre><code>C:\Tutorials\try\NodePractical\MEAN-Family&gt; env:PORT = 1234 server.js
  env:PORT : The term 'env:PORT' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
  At line:1 char:1
  + env:PORT = 1234 server.js
  + ~~~~~~~~
      + CategoryInfo          : ObjectNotFound: (env:PORT:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
  </code></pre>