Azure Linux App Service won't run my MERN stack - node.js

We've been having this issue deploying MERN stack into a single Azure Linux App Service. At some point We were able to run the Express Server but not both (We were able to run react client on a Windows App Service). But then upon further test everything it was able to run (please screenshot below). Everything is running fine locally, though..
Here is our Azure Pipeline:
Azure Build Pipeline - Build
Azure Build Pipeline - Deploy
Here is our package.json
package.json
package.json - continuation
The code runs with no error as per the log stream:
log stream - linux app service
But the webpage displays as blank

Related

Build fails while deploying from GitHub to azure app service (node JS Twilio backend)

I am trying to deploy my backend code to azure app services using the GITHUB actions, the code has been committed and in the action, yml file is also generated, and after clicking the build it fails with an error. Error: Process completed with exit code 1.
It depends which Action you used.
It is recommended to start with "Deploying Node.js to Azure App Service" and its prerequisites (creating an Azure App Service plan, creating a web app, configuring an Azure publish profile and create an AZURE_WEBAPP_PUBLISH_PROFILE secret.)
You can then create your workflow, following the example "deployments/azure-webapps-node.yml" as a possible template, for you to adapt.

Deploy Next.Js React App to Azure App Service

I created an Azure App Service running Node 16 on Linux. I ran next build and moved all files and folders that were generate inside the .next folder to the Azure App Service. Unfortunately, the app isn't running. I feel like I am missing some configurations or startup commands on Azure to successfully run the app. I would appreciate some help from somone that was able to deploy a NextJs app on Azure App Services. All other articles that I found were not able to solve my problem. This might be due to changes on the Azure platform.

Trying to get Azure Devops pipeline to run the app dll

I have azure devops publishing a dotnet core web app to an AWS server, but the app serilog logs are not kicking in because even though the DLLS etc are updated the myapp.dll is not re-started, so the logging setup code in program.cs is not executed.
If I run the app in powershell using "dotnet myapp.dll" then the logging file appears but that starts a seperate process on a different port... so it doesnt help.
The app runs under IIS on the server and Im not sure if this is a devops issue or something i need to do in IIS..
I added this as the last step to the pipeline but I get an error
You misspelled a built-in dotnet command.
You intended to execute a .NET Core program, but dotnet-.\myWork.dll does not exist.
You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
The pipeline doesn't start your application. Even if it worked, you would have an app running on the Agent that's executing the pipeline, not on your server.
If you want the app hosted on your server, I'd start with Publish an ASP.NET Core app to IIS tutorial.
Get it deployed on your server manually and ensure it's running correctly. But don't do right-click publish - use commandline all the way.
Once you know what are the necessary steps (and what might go wrong), you can start automating it.

Is necessary to restart node in every deploy to Azure Web App?

I build and deployed a Vue/nuxt web app to Azure Web App by configuring Azure DevOps build and release pipelines.
The app runs on top of node and Express configuration. I start the app on the server by typing: npm run start on Kudu's CMD. Then the start script is set in the package.json file to launch the command: node server/index.js.
On the other hand, the build pipeline is configured to trigger a new build of the app (npm run build) when a new commit occurs and then the release pipeline catches the output and deploys it to Azure by Zip Deploy mechanism ("Azure App Service deploy" task).
So far I found not in the need to restart neither the Azure Web App nor the node process to update the app. In some ocassion I did found some strange error behaviour I solved by killing the process and restarting all over again.
In an official and proper way manner should I do this every time a new build is released? And how can I do it? I can gues on how to restart node via post deployment actions but what about killing the process? I must kill otherwise the new process port number will collide with the running one.
As I know there exists some circumstances under which an application deployment might result in a restart.
See Deployment vs. runtime issues, App Service deploys files to the wwwroot folder. It never directly restarts your app.
So i think it's necessary when your changes in code do not start to work in your application, but if it works well when sometimes the restart occurs, you don't need to do the restart manually. Also, if you want to restart the app service, you can try Azure App Service Manage Task or restart it in Azure web portal.

Deploy a Vue.js app to Azure

We have a node.js application that we built its front-end with VueJS, we deployed our back-end code (java spring) properly and we got a link (https://ourWebAppexample.net) that runs the back-end code as expected.
We usually run the front-end on a local host from a folder that contains the code with "npm run dev".
Now we want to deploy the front-end to Azure web-app using Visual Studio Azure extension.
We tried some tutorials (like: https://code.visualstudio.com/tutorials/app-service-extension/getting-started) and we got deployment successful but it didn't work properly.
How do we deploy a Vue.js application to Azure and get a "link" where our front-end code should run? is there any other way to deploy a node.js code (not using Visual Studio) ?

Resources