## Not-so-quickstart

For those not familiar with Azure Functions v2 (not an uncommon situation given the docs aren't the world's best), here are some further pointers.

*nb. for the pros: I'm including this section here as I'd hope aftr would be a good choice for those introducing themselves to 'serverless', as implementing CRUD is often the first thing people want to do after "hello world".*

If for whatever reason you haven't already, create an Azure account and [explore the portal](https://portal.azure.com). *It's great, especially if you enjoy being redirected.*

### Creating a Function App: gotchas

Creating an App in the portal is pretty straightforward: hit *New* on the left, and *Function App* will probably be one of the first options you see. Search for it in the box if not.

Once you hit *Create*, you'll be given a form. Here's what you need to know:

* Your app name should be DNS-compatible. Also, it can't be changed once the App's been created.
* You'll probably want to make a new resource group for the App. This can't contain hyphens.
* For the OS: Node behaves similarly enough on Windows and Linux. As of writing (Feb 2018), stick with Windows.
* Currently, each Function app runs in a specific availability zone, so choose the location carefully.
* Ensure you *create new* on storage. You might want to change the name to something more sensible than the default.
* *Application Insights* can remain off for now.

It'll take a few minutes to create once you'll hit the button.

### Function App structure

I'd recommend setting up [local git deployment](https://docs.microsoft.com/en-us/azure/app-service/app-service-deploy-local-git) for your App; the docs for this are actually pretty good.

Once you've got your git remote set up as per the above, you'll need to create some files in the repo. `git pull` first, and you should at least see `host.json` appear.

```
myFunction/
  function.json
  index.js
host.json
package.json
```

`host.json` contains config applicable to your entire App, where `myFunction/function.json` only configures the Function called `myFunction`.

For now, `host.json`'s entire contents will probably just be `{}`. You should probably do *the sensible thing* and configure a [route prefix](https://docs.microsoft.com/en-us/azure/azure-functions/functions-host-json#http) for your APIs here (eg. `api/v1`). There isn't much more to say for this though.

`myFunction/index.js` will contain your Function's actual code.

`package.json` doesn't need any special treatment; just do `yarn init` as per.

With all this in mind, hopefully the [quickstart](../README.md#quickstart) should make more sense. :)
