How to deploy an application in Azure App Service using Local Git deployment | nodejs application

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video we will be deploying a node.js application in our Azure app Service uh this is my Azure web web app sitting on an Azure app service plan so this is the stack node 18 the minor version node 18 SDS let me quickly save it so this is the app where I'll be deploying uh you know a demo node.js application so that that app is nothing but just you know a basic index and I'll just try to deploy that using local git so in this video we'll be going through the deployment via the local git this is my application files these are my application files so these are the views this is the index basically just says this is just a demo and will come to node.js and the title if I ran this locally npm start and you can see it's running locally so the application is fine this is my app service currently nothing is deployed it has the you know the built-in you know web page that Microsoft gives you and all right so let's configure the local gate so you go to the deployments uh deployment section and then the deployment Center these are the options you have we will be using local git for this one so select local get and if you see the branch is Master it it will be handy once you save it so what happens is nowadays you when in your local gate you have main as your you know uh the default Branch but as you saw uh app service still has Master as the default branch this is my application uh we will be creating a remote for our app service currently we are on the main branch so let's quickly add the remote so this is the URL I will copy that URL it will come handy that's where your local get credentials are stored we will need that later but for now let's quickly add our remote so that's the command git remote add and then I'm giving a new name Azure and then the URI I have copied it and then let's this this is the you know URL URI that we have copied from the deployment Center so let's copy the entire command go back to our Visual Studio code in the terminal let's paste it and run it let's paste it and let's get remote ad and Azure is the name of my remote and the URI a remote Azure already exists I I already added it so it might exist let me check my good remotes and that's already existing that's fine uh you will not get it because you're adding it for the first time I have already you know tested it before the demo sir yeah so uh the next part is this where your locally your default branch is main but in Azure app service the default branch is mastered so while you do a push you need to you know push the main into master so the command would be git push Azure from local main into your remote master so let me just press enter and it will ask for your credentials so get credential manager this this will pop up uh if you go back to your Azure app service your deployment Center go to local git ftps credentials uh copy the local get username paste the username here we will need the password paste the password Here and then click OK once you click OK the push will start and if you see the push is in progress doing the deployment build operation started and if you can see there are zero errors and zero warnings and the deployment has successfully completed now let's go back to our browser and let's see the app service let's see the logs for deployment might need some refresh let's go back to settings okay yep so if you can see the status as come up as success for the last deployment let's go to our website and refresh it and yes it has successfully deployed if you can see this was what we had in our index.js and that that that's good let's make some quick changes here and push it again just to you know show some new changes popping up in our website I'll go to my index.js in my route I'll just change this title to Fitness geek and that should you know once I push this uh particular change after committing it will be visible in our website so I have done that I'll save this and then I'll have to commit this I'll just go ahead and quickly commit add a message I thought and comment once committed I'll need to push this again I'll do the get push Azure Main and colon master so the changes in my main will get pushed to my master in my remote which is your Azure website the Azure web app since this is a very you know Simple app it it takes like almost no time in deploying if you have a big files and big you know big zip file it will take a long a lot longer than this so error 0 warning 0 and app is successfully deployed we can go back to our website and do a quick refresh let's refresh this if you can see uh the new logs are visible in our deployment Center let's go ahead and refresh this website and you can see the title has changed so that that's all I mean we have deployed our application via local git and Azure app service so if you found this video helpful please do like and subscribe to this Channel and keep supporting thank you
Info
Channel: SkillBuilderZone
Views: 2,184
Rating: undefined out of 5
Keywords:
Id: tfH6eFOrWX4
Channel Id: undefined
Length: 8min 59sec (539 seconds)
Published: Fri Jun 02 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.