Can't Deploy React Ts App to Azure App service - azure

I am deploying ReactTs App to Azure App service by Azure Extension of Visual Studio Code.
Although it has been successfully deployed, but at the endpoint of the deploy link,
there is no change (the initial default interface of the App service).
This is the endpoint of the deploy link:
https://test-appservice-nev.azurewebsites.net/
At the endpoint provided by kudu (it shows the deployed ReactTS app), the display is correct. I don't understand why is that.
https://test-appservice-nev.scm.azurewebsites.net/wwwroot/

Post adding the below Startup command customer is able to see the published changes while he is browsing to the web app URL.
pm2 serve /home/site/wwwroot --spa --no-daemon
You can refer to this documentation for more information about React deployment on the app service.

Related

How to debug user information in localhost with easy auth in app service?

I have a simple webapp in .NET6. I'm able to authenticate users by deploying it to Azure App Service and follow through this guide (https://learn.microsoft.com/en-us/azure/app-service/configure-authentication-provider-openid-connect) if I open the azurewebsites.net URL.
However, without the module in local environment, how can I authenticate / debug when the web app is running on localhost?
You can debug your azure app service from localhost if the build copy is same as its deployed on azure.
You need to enable remote debugging option in App Service at below location
App Service-> Configuration - > General Setting
Then you can use cloud explorer tool of resp Visual studio get lsit of azure resource and accordingly you can attach debugger to app service.

Trouble to deploy an app in azure web app React

I'm triying to deploy a frontend app with Reac, the repository is hosted in github so I'm using github actions to continuous implementation.
The github actions says that the build and deploy are working correctly but when I tried to use the url http://<>.azurewebsites.net
enter image description here
it return 503 error "The service is unavailable"
You need to setup the (enterprise) application registry for this app to reflect what it does. Else the App Service cannot serve your application.
Look for the Platform Configuration in authentication blade.

How to deploy Vue application to Azure App Service?

I have a static Vue web app, I want to deploy it to Azure App Service - not Static Web App because I don't have a Github and I don't want to.
I have followed the guide here (MS Docs), deployment works fine, but I'm not getting anything on the website. It's just a default page showing "Hey, Node developers! Your app service is up and running". What am I missing?
The code runs fine on my local. I can "npm run build", take the dist folder, dump it into a server's IIS wwwroot and it works fine. I'm just having problem to deploy it to Azure App Service.
Edit: Found the answer: Application is not loading when deployed via azure app service

Error while browsing angular 8 app which is deployed in Azure

Please let me know why i am seeing below error when browsing angular app( version 8), my default app runs on localhost:4200 but i get error when i try to browse in azure, i am using azure app service extension in visual code and deploying through that and i dint see any error while deploying, i read some one mentioning adding port in config would resolve the issue, but it didn't, let me know what i am missing here.
Config file with port number
error in azure log stream
Azure App service only supports port 80/443. You can do app.listen(process.env.PORT); in your code. I had a similar issue when hosting node app. See here.
Build the web application before deploying with the ng build* command. This command will create the dist/project-sample directory containing a transpiled, minified, ready-to-deploy version of your application.
Deploying to an Azure Web App is as simple as right-clicking on the web app in the Azure App Service extension and selecting the “Deploy to Web App” option. The extension will make a suggestion on what to deploy but use the Browse option to select the dist/project-sample folder instead.
Also the default version of Node on the Azure Web App is not the version that you want to use. Luckily, the version of node can be changed with the WEBSITE_NODE_DEFAULT_VERSION with value 10.16.0. environment variable. Navigate to the Application settings section of the Application settings page for your Azure Web App.
For more details, you could refer to this article. BTW, check your web.config with this SO thread.

How to deploy and host .NET Core self-hosted console apps in Azure?

App 1: I have a React app (based on create-react-app) which I've added as a Web App in Azure - that was pretty straight-forward to setup. This is using the JS SignalR client to communicate with the server, mentioned next.
App 2: This app is the ASP.NET Core SignalR Server application created with dotnet new console. This app exposes a SignalR endpoint and is "self hosted".
App 3: A 2nd ASP.NET Core console app is setup as a SignalR client. This is responsible to fetching some data, and sends those data to the SignalR server. This takes the SignalR endpoint (url) as a commandline argument.
Running all this locally is pretty straightforward:
App 1: npm start / serve -s build
App 2: dotnet run -commandline args (runs on localhost taking a hubpath and port from the args supplied. The port is so that multiple instances SignalR servers can run on localhost - not sure if this is the way to do it in Azure or if they're differentiated with separate urls and hosted seperately there)
App 3: dotnet run "http://localhost:5000/somenotificationhubname"
I've added a bat file in each of the console apps, so I can open multiple instances of those, with different args.
So locally it runs as easily as clicking 3 bat files.
But I'm kinda lost on how to host all this in Azure. The web app seemed pretty straightforward. I just created a web app in Azure, connected to it through an FTP client and copied over the contents of the build folder from the React app.
But what to do with the ASP.NET Core console applications so that the SignalR console app will be hosted in Azure and has its endpoint exposed for the other 2 apps to consume?
I tried adding both both App 2 and 3 as webjobs under App 1, but that didn't seem to work.
I've also heard that SignalR should not be running on IIS, so would it make sense to make it self-contained (exe) and run it inside a docker container? Any help is much appreciated.
I will suggest to change your app to use AppSettings file for configuration values instead of the commandline args.
You can easily change the value of appsettings without redeploying or changing anything.
You can have multiple appsettings file based on environments.
Allows you to easily duplicate the app with same code but different appsettings for your multiple signalr server.
This will make it easier to deploy using the standard publishing wizard in Visual Studio or via command line.
You could try the publish Profile in Azure App Service with the help of Visual Studio,
Reference 1
Reference 2
Once you successfully publish your webApp. You can double check the deployment using kudu service (or) App service editor
Advanced Tool-KUDU
AppService editor

Resources