How to host a Static Website on Azure App Service( Using Azure CLI)

How to host a Static Website on Azure App Service( Using Azure CLI)

*Step 1. Open Power shell on your computer *



*Step 2. Download Azure CLI for either “windows” or “Mac”
Go on Google, search for “Download Azure CLI” for your computer version and install it *


*Step 3; After Installation, open “Power shell” and login into Azure portal by entering the command below
“az login” , then “check your default browser, a window is meant to be open for you to login to azure portal. *



*Step 4: After Login, the above pictures shows, then proceed back to power shell to confirm you are logged in *

Step 5: Create a resource group or use an existing resource group which you have already created
To create a resource group on power shell, enter the command below ** **_“az group create –name “Resourcegroup” –location “eastus” _


**
Step 6: Create a Web service plan, by entering the code **
_“az appservice plan create –name WebPlan –resource-group “Resourcegroup” _


Step 7: Create a Web Application to run **
**“az webapp create –name “MyWebApp” – resource-group “Resourcegroup” –plan “WebPlan” “


*Step 8: Check Azure portal, click on App service on the home page, check the empty website if its running *


Step 9: Check if the empty web app is running , click on “Default domain” or copy the link and paste in a browser


Then back in webapp service in the azure portal, search for “advance tools” and click “Go”
To access the back end of the hosting service.
Then Click “Debug console” and select “CMD



*Then navigate to raw file page *

*Then edit the above raw code, by inserting the raw code of the website you want to host from an IDE into this page.
And save
Step 10 : Then go back to the empty web page and refresh Congratulations, you have hosted a web page on AZURE PORTAL *