Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all articles
Browse latest Browse all 3509

Start Button Triggers "npm start"

$
0
0

I have an Angular CLI + WebApi project that runs fine.  Currently, when I hit the start button in Visual Studio 2017 (NOT VS Code) it opens a browser window for the angular application and starts the WebApi in the background.  I want to use a proxy file to get around the CORS issues, as is recommended on the Angular documentation.  The problem is that in order for the proxy file to work I need to use the command "npm start" instead of "ng serve".  Is there a way to control the command execute when I hit the start button in Visual Studio?

Here is the current scripts section of my package.json

"scripts": {"ng": "ng","start": "ng serve","build": "ng build","test": "ng test","lint": "ng lint","e2e": "ng e2e"
  },


Viewing all articles
Browse latest Browse all 3509

Latest Images

Trending Articles



Latest Images