INTRODUCTION
Building, deploying, and scaling web apps is made easier with Microsoft Azure's Azure App Service, a flexible platform-as-a-service (PaaS) solution. Everything from simple websites to intricate business apps can be hosted on it. It's a popular alternative for developers because of its advantages, which include easy scalability, numerous deployment choices, worldwide hosting, and smooth connection with other Azure services.
This article will walk you through setting up an App Service and deploying content.
1.Prerequisites
- A Microsoft Azure account.
- Azure CLI
- Basic understanding of Azure portal navigation.
- Necessary files or content to upload (e.g., a sample HTML website).
2. Download and Install Azure CLI
search for the azure CLI on google and install the compactible version to your PC(Windows or MacOS)
3. Create the web App with Azure CLI and PowerShell
- open terminal or powershare and run as administrator
- login to azure using the command
az login
- The Azure login page will open in your browser. Sign in to your Azure account
- Next step is to create a resource group. To create enter the command
az group create --name YesAppRGOladele --location canadacentral
A simple explanation of this command
- az- azure portal, we are working on azure
- group- what we want to do on azure is to create a 'resource group'
- create- the action we want to do, which is to create
- --name YesAppRGoladele- this is the name to be assigned to the resource group created. You can change it to any name that suits you.
- --location canadacentral- the location where we want our server to be will be canada central.
Notice there is a space after each command word.
- Create an App service plan. Enter the command
az appservice plan create --name YesAppoladelePlan --resource-group YesAppRGoladele
This will set up YesAppoladelePlan within the already created YesoladeleRGAfeez resource group.
- Set up a Web App. Enter the command
az webapp create --name YesAppServiceApp --resource-group YesAppRGoladele --plan YesAppoladelePlan
4. Upload content on the webapp
- Go to azure portal in the App Service section to ensure the web App was successfully created. Search for the app service.
- click on the created webapp
on the overview page click on the default domain
The link will be re-directed to the created webapp, which should be running and waiting for contents to be uploaded
In the azure portal search Advanced Tools.
Select it and click Go.
A browser(KuduPlus) is opened up in a new browser this contains tools for uploading our codeclick on debug console
Reopen the Default domain and notice your content have been uploaded and its live
In this tutorial, you discovered how to create and deploy a web app with Azure App Services. We walked through setting up the service, configuring it, and adding content. Thanks to its scalability, user-friendly interface, and global reach, Azure App Services is an excellent choice for hosting web applications. Your app is now live and ready for further development and exploration.
Thank you for taking the time to read this guide.
Top comments (2)
Amazing work!
I appreciate you brother