generator-aspnetcore-angular2
generator-aspnetcore-angular2 copied to clipboard
Azure App Service deployment issues
This may not be a bug, could be a design consideration, but it'd be good if we could figure out how to mitigate azure app service deployment issues.
This segment of code in the template causes deployments via Git to azure app service to throw errors during startup. I'm not sure if this is due to the node_modules folder needing to be populated in the wwwroot folder at build-time, or if there's a potential workaround that could be implemented to avoid this.
Maybe what we could do is have a two-app scenario? In which the API is one app, and the ng2 client app is another app? That way, the API end of things wouldn't need to serve the static content.
excuse me Sir. I use your lib, but when I ran the code, I got this error.
could you help me ?
this is my project : https://github.com/epiii/rplExercise/tree/master/aspAngu
thanks in advance
@bradygaster I created an Azure web app and set it to automatically deploy from this repository. I ran into the same issue as you, but I was able to workaround it by making the following changes:
- Modify the
project.json
to include aprepublish
command to runnpm install
andtsc
, and add thenode_modules
directory in theinclude
section. - Modify the
package.json
file to merge thedependencies
anddevDependencies
sections - Modify the
WEBSITE_NODE_DEFAULT_VERSION
environment variable under the application settings section in Azure portal to something newer like5.6.0
You can see it working here.
I do agree that for a sufficiently large application, it may be best to split this up into two apps. How would you like to proceed? Would you like to submit a PR for these changes, or would you like to explore the two-app scenario further? I also planned on adding the features in this repository as another option to this generator, that way there will be an option to generate a more advanced project that uses webpack, karma, protractor, ts2, universal, etc., so I'll probably need to make those changes there as well.
@epiii I've created a separate issue for your questions here.