I'm following this strategy to deploy angular app and web api in the same Azure Web app.
I have Angular app development with VSCode and Web Api in VS 2017. So it's not a complete app as in Angular App template from VS 2017
I deployed web api with
services.AddSpaStaticFiles(configuration =>
{
configuration.RootPath = "ClientApp/dist";
});
and
app.UseSpa(spa =>
{
spa.Options.SourcePath = "ClientApp";
});
Copied built version of angular app to ClientApp/dist
folder on Azure Web App. Set azure app's WEBSITE_NODE_DEFAULT_VERSION
to 10.14.1
which available there.
But when I browse the website, I get errors in browser console -
SyntaxError: expected expression, got '<'[Learn More] runtime.js:1
SyntaxError: expected expression, got '<'[Learn More] polyfills.js:1
SyntaxError: expected expression, got '<'[Learn More] styles.js:1
SyntaxError: expected expression, got '<'[Learn More] scripts.js:1
SyntaxError: expected expression, got '<'[Learn More] vendor.js:1
SyntaxError: expected expression, got '<'[Learn More] main.js:1
I see that, all the requests are getting index.html and not actual .js file.
It seems that angular app with node is not getting fired up.