Hi! Welcome to my URL Shortener.
pip install -r requirements.txtpython -m gunicorn main:app --bind 0.0.0.0:$PORTMake sure you have enviornment variables ADMIN_CODE and DATABASE_URL set.
If you don't know where to get a database url, it looks like postegresql://something.
Use Neon
Page for basic URL creation.
Redirects to the long link.
Returns information about the link like the expiry date and amount of clicks.
Shows a page for finding out where short links lead.
Page for advanced URL creation. Passwords coming soon?
API endpoint for within the app to unshorten links
API endpoint for within the app to create links
Clears the database using the password from .env
Clears expired links, to be pinged by UptimeRobot or etc. every 5 minutes.
All endpoints require a Bearer authorization header. If you want one for some reason, reach out.
All endpoints return JSON.
Creates a new short link.
Returns information about the link like the expiry date and amount of clicks.
The short string is the <id> in /<id>.
You cannot give a full short link for this endpoint.
Warning: This will only return 404 if you accidentally send a full short link for it.
vivaan [at] vivaan [dot] dev