Static Web App API

Fahd Abrahams 1 Reputation point
2020-06-24T08:57:12.873+00:00

Hi,

I recently started the Microsoft learning track, whereby one creates an app by means of utilizing Azure, Github, node.js, npm and the Microsoft sandbox. After having followed all the instructions, the API won't seem to load in the web app although it loads when I accessed it locally through my web browser. I do understand that this is merely for learning purposes, although I like to do things right the first time. I have performed several commits, push and pulls to Github with very little success in loading the API from the preview URL. Please help.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,913 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 28,636 Reputation points Microsoft Employee
    2020-06-24T15:29:13.83+00:00

    Hi @Fahd Abrahams ,

    Sorry to hear that you weren't able to get your app up and running. I assure, it's not that difficult. If you followed similar steps as I've done, you can enable to application logging on your app to determine what's causing your app not to start.

    10578-2020-06-24-10-32-54-readbetterinbyryan-app-service.png

    Other things to look at is to check to .listen(...) to ensure App Service will bind to your node app. You don't need to specify host and use process.ENV.port so your node app will bind to the environmet variable. By default, this is 8080. If it's a dependency issue, you can adjust the nodejs runtime of your app service from the General Settings under the Confiugration blade. If any these don't help, let me know.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.