If you are not read the first article about BUILD POWERFUL NODE.JS WEB APPS WITH AZURE APP SERVICES please go through the article which is published few days before. Then only you will get a clear picture of the follow-up article ?
So let’s deal with the Azure CLI to deploy the application to the azure app services.
Now we need to login to azure subscription using the command line interface. for that we need to use the below command
This will redirect it to the web browser to authenticate the azure CLI.
Now we are good to go , The CLI is authenticated and now we can start playing with it 🙂 now we need to make sure that we are in the root directory of our application by typing the command in the terminal.
Now Create the App Service app resource in Azure with a unique app name with the next command. Your web app’s URL will be http://<appname>.azurewebsites.net.
azure site create --git <appname>
if you are using the azure subscription for the first time, then you need to create following things in it.
So,we successfully created a web app in azure cloud.
Now we need to setup our node.js application production ready.
open the config/config.js file in a text editor and remove the production port || condition from the json.
Save the document and commit the code to the git using a commit message
git add .
git commit -m ""
git push azure master
Finally, we need to check our app in the browser
azure site browse