I'm working on the Angular SSR, using the Angular official sample project to do the testing.
Steps to build the Angular SSR project.
- npm run build:ssr
- it will auto generate the dist folder. Inside contain the browser and server folders.
- connect Web App Service ftp using the FileZilla.
- Upload the build files to wwwroot.
I had try different way to do the deployment
- Deploy browser and server folders to Azure wwwroot folder, but it doesn't work correctly, when open the url, it show the "You do not have permission to view this directory or page.".
- Deploy the content inside the browser folder. (It work, but direct url to 'www.something.com/dashboard', it will show the error "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable." AND not sure is this correct way or not)
- Deploy the content inside the server folder. (It show "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.")
My Questions
- What is the correct way to deploy the Angular SSR to Azure Web App service?
Expected someone can listdown all the steps from build and deploy to Azure Web App service. It will be much more appreciated if screenshot or url to refer is provided.
You can deploy Angular:SSR application to Azure App Service through Filezilla ftp:
-Enable Application logging in Web app=> App Service Logs so that you can find out the exact error in error logs in LogStream.
Push your code to GitHub:
Check Sample yaml code to deploy Angular SSR universal application to Azure web app service using Devops pipeline by SiddheshDesai:
You can also follow the steps given in Deploy Angular 5 build:ssr on Azure - Stack Overflow by r3plica and starian-chen-msft.