Monday, October 12, 2015

Getting Your Node Into Azure

If you’re like me, and you are, you have fallen in love Node.js

You already knew JavaScript and love lightweight & efficient runtimes.

NODE!

You couldn’t believe how easy it was to get up a web framework with Express.

NODE!

OMG, so much Node code is already out there and being shared for me to use in my projects at npm.

NODE!

You had a blast creating a bot for your Slack site to frustrate and delight your friends.

NODE!

You can host it easily from a git repo on Azure.

NODE…Azure?

AZURE!

I said I loved Node.js, well, I also love Azure.

I love the UI(I’m using the old portal UI by the way…) and how I have access to so many amazing services at my finger tips.  I’ll be honest and wish I knew how to use more of them than I do.  But this blog isn’t about my skillset, it’s about to quickly and easily get your Node app into Azure.

So you already have a Node app, right? Great. 

And you’re source code is in a Git repo, yeah? Yeah.

Alright, we can put it out there for the world.*

*I’m not dealing with load balancing or scaling…so please just play along.

Ok, setup your Azure account if you don’t have one yet.  Then setup a new web app with New->Computer->Web App->Quick Create

NewSite

Name your URL(named mine NAZURE) and hit ‘Create Web App’.

Click on your new web app:

WebAppsjpg

then under ‘Integrate source control’ select ‘Set up deployment from source control’.  You’ll then get a ‘Where is your source code?’

git

Choose your option.  With ‘Local Git Repository’ Azure it’ll walk you thru setting up Azure as a remote repo(sitory).

Once you’ve added Azure as your remote it’ll give you the git bash command to publish.  Something like ‘git push azure master’.

Now, visit your web app’s URL.

You did it!

NODE! AZURE!