YogitaKadam14
Posted on January 4, 2022
To deploy your application on the Azure
You should have a Microsoft Azure Account. You can get a free account for one month.
Refer below link to create Azure account:
Azure Account
Azure offers a number of ways to host your application code. The term compute refers to the hosting model for the computing resources that your application runs on.
If you want to deploy your application on the managed platform by selecting the runtime, An App Service is the right choice.
Which service should you choose?
Azure Virtual Machine, which is considered as IaaS (Infrastructure as a Service) and the other one is Azure App Service, which is a PaaS (Platform as a Service). We will discuss which service is better for different use-cases, and what are the differences between these two services.
Azure Virtual Machine
- Azure Virtual Machines is detailed as "It provides on-demand, high-scale, secure, virtualized infrastructure".
- Azure VMs are more expensive to run in comparison to Azure App Service.
- Developers describe Azure App Service as "Build, deploy, and scale web apps on a fully managed platform". Quickly build, deploy, and scale web apps created with popular frameworks
- Azure App Service requires much less managerial efforts in comparison to Azure Virtual Machines.
- Azure App Services do not offer Pay-as-you-Go. Hence, you’re paying for the service plan, even if you’re not using it.
- Azure App Service have constraints in comparison to Azure VMs in terms of scalability. Hence, Azure VMs are preferred for apps, which have scope to expand for future.
- The development of app is much simpler and faster in Azure App Service.
- Azure VMs offer developer more control over the environment. Like, one can’t choose underlying OS of VM in an Azure App Service.
- There may be constraints for the support of certain programming languages on Azure App Service. In that case, one has to use Azure VM to create environment for the programming language.
Use below configuration for deployment:
For NodeJS Application:
Build provider: App Service Build Service
Runtime stack: Node
Version: Node 16 LTS
Operating System: Linux
Deployment: Bitbucket
Refer to the following link:
Deploying Your NodeJS App on Azure
For React Application:
Build provider: App Service Build Service
Runtime stack: .NET
Version: ASP.NET V4.8
Operating System: Windows
Deployment: FTP deployment using FileZilla
Refer to the following video link:
Deploy ReactJS application to Azure cloud using 3 different ways | FTP | Kudu | CI/CD DevOps
Note:
In App Service, application settings are variables passed as environment variables to the application code
.NET framework and IIS require a web.config file to identify application folder structure for navigation.
<configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".json" mimeType="application/json" />
</staticContent>
<rewrite>
<rules>
<rule name="Main Rule" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Conclusion
There is a lot to Azure. These are basic steps of the deploying React and NodeJS application on App services. Understanding of which service should you choose App Service or Virtual Machine for deployment?
Posted on January 4, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.