I am developing a SPA application on ASP.NET 5, and I wanted to go further and separate the client (js, html, etc.) and the web api projects so that there is a clear distinction between the client and the server.Apparently, there are a number of technical problems that complicate the situation:
- How to enable js / html / etc. files in the resulting published project? (Ideally, I want to be able to edit js / html and see the result in the browser on the fly). There is a path that I found has a linked folder.
- I want to share some javascript files again, for example. angular services in projects Cordova js
- In mvc6 there is a very nice feature with environments that are not easy to do in a js project, and I would have to use some Index.cshtml to use it, but this is not critical, since I can use gulp to do similar stuff
- How js finds out the api url (this can probably be done with gulp as well as in some config script)
I am not 100% sure that this is a good idea, but maybe someone tried it and can share the experience and the pros and cons of this approach. At the moment, the most important problem is to include the client project in the service project one way or another, so that they are combined into one web application, which I can deploy in such a way that it does not complicate the development.
source
share