Skip to content

Instantly share code, notes, and snippets.

@estiller
Last active July 9, 2020 20:13
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/0481311fa1a46fabc528be64baac2d6d to your computer and use it in GitHub Desktop.
Save estiller/0481311fa1a46fabc528be64baac2d6d to your computer and use it in GitHub Desktop.
Building a Custom URL Shortener Using Azure Functions and Cosmos DB - Adding the URL Redirect Endpoint
{
"bindings": [
{
"authLevel": "anonymous",
"type": "httpTrigger",
"direction": "in",
"name": "req",
"methods": ["get"],
"route": "{vanity}"
},
{
"type": "cosmosDB",
"direction": "in",
"name": "registration",
"databaseName": "registrations",
"collectionName": "registrations",
"createIfNotExists": "true",
"connectionStringSetting": "RegistrationsDB",
"collectionThroughput": "400",
"partitionKey": "{vanity}",
"id": "{vanity}"
},
{
"type": "http",
"direction": "out",
"name": "res"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment