Skip to content

curtisalexander/calex-link-shortener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

calex-link-shortener

Azure Functions link shortener for calex.dev

Build Status

Requirements

Local

Requires the following environment variables be set within local.settings.json.

  • BASE_URL = Base url (e.g. https://links.mydomain.com) used to create the short url (e.g. https://links.mydomain.com/a)
  • STORAGE_ACCOUNT_NAME = Azure storage account name where the Azure table will be stored
  • STORAGE_ACCOUNT_KEY = Azure storage account key where the Azure table will be stored

Azure

Requires the following environment variables be set within the Azure Function Application settings.

  • BASE_URL = Base url (e.g. https://links.mydomain.com) used to create the short url (e.g. https://links.mydomain.com/a)
  • STORAGE_ACCOUNT_NAME = Azure storage account name where the Azure table will be stored
  • STORAGE_ACCOUNT_KEY = Azure storage account key where the Azure table will be stored

Client

There is a simple Python client within the client directory that can be used to call the WriteShortUrl, DeleteShortUrl, and GetAllUrls Azure Functions.

The following environment variable must be set locally.

  • AZURE_WRITESHORTURL_URL = Azure Function url
  • AZURE_GETALLURLS_URL = Azure Function url
  • AZURE_DELETESHORTURL_URL = Azure Function url

To get help, run the following.

python main.py --help

Alternatively, run help for a specific subcommand.

python main.py write --help
python main.py get --help
python main.py delete --help

Inspiration

Releases

No releases published

Packages

No packages published

Languages