I'm currently working on Angular SSR and utilizing the Angular official sample project for testing purposes.
Steps for building the Angular SSR project:
- Execute npm run build:ssr
- This will automatically generate the dist folder, which contains both the browser and server folders.
- Connect to the Web App Service FTP using FileZilla.
- Upload the build files to wwwroot.
I have experimented with various deployment methods:
- Attempted deploying the browser and server folders to the Azure wwwroot folder, but encountered issues where opening the URL displayed "You do not have permission to view this directory or page."
- Tried deploying the content within the browser folder. This approach worked partially, however, navigating directly to 'www.something.com/dashboard' resulted in an error stating "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable." Unsure if this is the correct method.
- Deployed the content within the server folder, resulting in "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 Angular SSR to Azure Web App service?
It would be greatly appreciated if someone could outline all the steps from building to deploying on Azure Web App service. Any screenshots or URLs for reference would also be helpful.