Node.js + Azure Functions + Github
Deploy a Source-Controlled “Azure Function” in “minutes”
I am writing this guide at a time when finding documentation and examples for deploying Azure Function is hard to find. I will piece together as much information together to make this process a bit easier for the next person. There are many other features of Azure that won’t be mentioned. This is written for those comfortable with Node.js and interested in Azure Functions as a means of deployment.
Step 1: Create your Azure Account + Sign up for a 3 Month free Subscription
I have shamelessly used my university account though creating a new account shouldn’t be all too difficult. Azure uses a thing called a “Subscription” to consolidate billing. Fortunately for you, Azure has a trial subscription called “Azure Pass!”

Step 2: Create your Azure Function App
You should be able to visit https://functions.azure.com/signin and create almost all of the scaffolding for your function app. Because Azure uses your Function App’s name as a subdomain, it’ll have to be unique (perhaps for the Region?). We will see more examples of this later on.

After, you’ll be redirected to the page in Step 4. If you want to play around, now would be a great time! You can always create more Function Apps later!
Step 3: Build out your Functions on Github
As you poke around documentation, you’ll come across this link which states that you should place
ONE FUNCTION PER FOLDER.**
Because writing our own code is much too slow, we can use a Yeoman generator to template out our Functions. After you have created and cloned an empty Github repository, run the Generator in the root of project folder. Feel free to choose you own adventure when selecting from the available functions!


You should have a directory that looks something like the one above. Commit your code and move to the next step! :)
Step 4: Connect to your Github repository


After giving permission for Azure to access your Github resources, choose your repository. You should see a message like the following come up:

This Azure creating a Virtual Machine/Container for your code to run in. Soon you will see confirmation that your commit has been processed.

After refreshing the Function App pane, you’ll see your function!

Step 5: Test out the Function!
Hop on Postman and paste your Function URL in. When you send the request, you should see a new log appear!

Next, we will dig deeper and find where your Function lives. Let’s head of over to Kudu.

I’ll leave it up to you to poke around, but this gives you some level of access and visibility into your code deployments.
Let’s create a package.json and add a package. In this example, I will be using nostra.
We will need a way of installing our packages after Azure syncs the repository. To do this, we will use Kudu’s “.deployment” file (see their wiki page). Take a look at the following commit on what to add here.
Contribute to MediumFunctionApp development by creating an account on GitHub.github.com
With Kudu, we can see that node_modules exists and that our new application code was deployed automatically. You can head back to Postman and verify your progress! (Or lack thereof. Apparently, the deployment script is run in the “site\repository” folder and not the “site\wwwroot.” I’ll leave this up to you to figure out :)
**Honestly, I was reading and Googling around and trying to figure out why nothing from Github was showing on my first Azure Function app. As you can tell, I really wish this fact was called out so I have done so here! :)