I have a solution with two projects in Visual Studio 2017.
One contains all of my Angular files for client side SPA. While the other is a ASP.NET web api project that serves as an endpoint for http calls made by the Angular front end.
I'm using Angular CLI and ng-serve to deploy my angular application to localhost:4200
The web api is deployed to localhost:6463
In a production environment, they would be under the same domain. However, in development they are not in the same domain as the port differs for localhost. Forcing me to implement CORS as the Angular app has to talk to the web api.
To me, it seems less than ideal to implement CORS for the purposes of development only.
Is there a better structure? Or is there anything that I am missing?