title: ng serve --proxy-config proxyconfig.json not working
body: <p>I'm building an app using MEAN stack. I'm using Proxy config file to make requests to the backend which is written in Node JS.</p>
  
  <p><strong>proxyconfig.json</strong> </p>
  
  <pre><code>{
    "/api/*": {
     "target": "https://localhost.com:3333",
      "secure": false,
      "changeOrigin": true,
      "pathRewrite": {
        "^/api": "https://localhost.com:3333/api"
      }
    }
  }
  </code></pre>
  
  <p>Code in Component file </p>
  
  <pre><code>  this.http.get("/api/posts",{responseType: 'text'})
    .subscribe(
        data =&gt;
        {
             console.log('successs');
        },
        error =&gt;
        {
  
            console.log(error);
  
        }
    );
  </code></pre>
  
  <p>Code in Node JS server</p>
  
  <pre><code> app.get('/api/posts', function(req, res) {
  
    console.log('Posts Api Called');
  
    res.status(200).send({ data: 'somedata' });
  
  });
  </code></pre>
  
  <p>I'm getting 500 error when I inspect the request from Chrome. The <code>GET</code> method is not getting called at all. What could be the cause?</p>