How to make an angular application take arguments from command line? : <p>I have an AngularJS application in which my code looks something like this:</p>

<pre><code>myApp = angular.module('myApp',
  [
    'ui.router',
    'ngMaterial',
    'ngMessages'
  ]
);

myApp.constant('CONSTANTS', (function() {
  // Define your variable
  return {
    backend: {
      baseURL: 'http://mybackend.com:3026'
    }
  };
})());
</code></pre>

<p>I run this application using <a href="https://www.npmjs.com/package/http-server" rel="noreferrer">http-server</a> on port number 8000 like this:</p>

<pre><code>% http-server -p 8000
</code></pre>

<p>I want to pass in a command-line argument for the <code>backend.baseURL</code> such that it over-rides the value specified in the code. How can I do it??</p>
