locked
Deployed react web app through FTP, still see welcome screen. RRS feed

  • Question

  • Hi,

    I've created a web app in azure, Node JS based, then connected through FTP and copied my 'build' dir to site/wwwroot folder in the server, even erased the original HTML file that resided in the folder.

    now when visiting my website in Azure, I still see the original welcome screen saying:

    Hey, Node developers!


    Your app service is up and running.

    .....

    when asking for index.html file, i see GET has failed for index.html

    what's wrong here?

    Thanks.

    Saturday, April 11, 2020 12:26 PM

All replies

  • Thanks for asking question! Just to confirm if you have deployed to a Node Linux web app?

    If so, then by default, it's going to use hostingstart.html as the default document unless you configure it to look for a different file. You can use a JavaScript file to configure your default document. Create a file called index.js in the root folder of your site

    So, go to your ssh terminal, navigate to /home/site/wwwroot then Create index.js you may refer to https://docs.microsoft.com/en-us/archive/blogs/waws/things-you-should-know-web-apps-and-linux#NodeHome


    Also, an easy way is to use pm2 since that is already part of stack. Pass the below startup command for the app

    pm2 serve /home/site/wwwroot --no-daemon

    

    Once done restart, it should pick the pages from the docroot (/home/site/wwwroot)

    Monday, April 13, 2020 7:44 AM
  • Just checking in if you have chance to see previous response. 
    Tuesday, April 14, 2020 12:09 PM
  • tried it, looks good, can see the title of my index.html now, but thats it, can't see the actual page. but that looks like a react problem not a server one.

    thanks!

    Wednesday, April 15, 2020 10:58 AM
  •  

    Glad to hear that issue resolved. Lets us know if you have further questions on this.

    --------------------------------------------------------------------------------------------------------------------

    Do click on "Mark as Answer" and “Vote as Helpful” on the post that helps you, this can be beneficial to other community members.


    Thursday, April 16, 2020 5:35 AM