Skip to content

Instantly share code, notes, and snippets.

@estiller
Last active July 9, 2020 20:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save estiller/e795ee7283402f1b8343e1bf5b786b6d to your computer and use it in GitHub Desktop.
Save estiller/e795ee7283402f1b8343e1bf5b786b6d to your computer and use it in GitHub Desktop.
Building a Custom URL Shortener Using Azure Functions and Cosmos DB - Authoring the URL Registration Endpoint
{
"bindings": [
{
"authLevel": "anonymous",
"type": "httpTrigger",
"direction": "in",
"name": "req",
"methods": ["post"],
"route": "register"
},
{
"type": "http",
"direction": "out",
"name": "res"
},
{
"type": "cosmosDB",
"direction": "out",
"name": "registration",
"databaseName": "registrations",
"collectionName": "registrations",
"createIfNotExists": "true",
"connectionStringSetting": "RegistrationsDB",
"partitionKey": "/id",
"collectionThroughput": "400"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment