Azure Functions is a great tool for writing applications and get up and running quickly and to be super productive quickly. Another benefit is that when using the consumption plan small side projects are pretty much free. These posts are my learning from a small side project to log time spent on different tasks.

I recently wrote a post about hosting a SPA with Azure Functions and Blog storage and now I we are going to add an API. First we need to add another route to our proxy that proxies the API as proxies always will run before the functions. I also started to use environment variables to get the application and blob urls. This is done via <APP_URL> in the Backend URL field. The new route should look something like this:

The new api proxy.

I also had to add one more route for my spa as it did not work properly, the complete proxies.json looks like this:

Now you can just write HTTP functions and your app will automatically be able to call them. Of course this will also work with any other backend as well.