Requires Docker and Docker Compose.
example.env to .env. Change the variables as you see fit. If you don't require a base redirect nor an API key, you can skip this step.docker-compose up --build -dType "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> test_data = {'link': 'https://www.riverways.app/'}
>>> resp = requests.post('http://127.0.0.1:5000/new', json=test_data)
>>> resp.json()
{'link': 'https://www.riverways.app/', 'expire': 86400, 'resetExpireOnClick': False, 'id': '2XVWK8ZI'}
If the environment variable APIKEY is specified.
>>> header = {'X-Api-Key': 'Your-api-key-here'}
>>> resp = requests.post('http://127.0.0.1:5000/new', json=test_data, headers=header)
>>> resp.json()
{'link': 'https://www.riverways.app/', 'expire': 86400, 'resetExpireOnClick': False, 'id': 'loD4MbMc'}
Content type
Image
Digest
Size
372.2 MB
Last updated
about 5 years ago
docker pull chand1012/link-shorten