Visual Studio Code - Azure Function Extension

A good way to start writing Azure Functions in a blazing fast manner is to use the Visual Studio Azure Function Extension. It's a fun way to experiment with what you can do and you don't need to leave the editor.

Go here and click to run the install package for the function extension:

https://code.visualstudio.com/tutorials/functions-extension/getting-started

Once installed you will have a neat little icon in the left menu presenting this interface. I have just collected some simple print screens for you guys so you can follow the process.

1. Simply Press the Azure Icon and Sign in to your Azure environment
2. Click create function, this will start the scaffolding process of a Function App project
3. Select folder or use current
4. Use your language that is best suitable for you
5. Choose trigger of your choice
6. Pick a suitable name for your function
7. Authorization level, read up on authorization levels before deploying your functions
8. And here we have a base for further development

Now it's up to you to do something useful with this awesome bad named function :)

For those of you that probably have created Azure Functions from the Azure Portal you recognize the function.json file that contains our configuration and choices from the earlier steps.

function.json
{
"disabled": false,
"bindings": [
{
"authLevel": "anonymous",
"type": "httpTrigger",
"direction": "in",
"name": "req",
"methods": [
"get",
"post"
]
},
{
"type": "http",
"direction": "out",
"name": "res"
}
]
}

So  how about Deployment?

So when we are satisfied with our function and want to deploy it to our Azure Portal it is as easy as all the previous steps.

Simply click the Azure Icon in the left menu again and then press the upwards arrow for deployment to function app.

1. Deploy to function app
2. Create new or select existing function app.
3. Enter a globally unique name for your new Function App
4. Select / Create and name a new Resource group to deploy to
5. Select / Create a new storage account used in Function App
6. Pick region for the resources
7. Provisioning is on its way
8. If everything works out ok you should see your azure function in VS, you can also see that we are able to connect against a GitHub Repository as well.
9. In the Azure Portal everything is already set up and runs as expected.

Even thou it's pretty easy to understand how everything holds up I know that Azure functions isn't obvious for all, or most common, they didn't have the time to try things out, perhaps this can help get you up to speed in a faster pace. I Wish you luck, happy coding!