A simple server that recieves a long url as parameter and returns a tiny-url (that can be expanded).
Built originally with hyper, now using warp to handle HTTP requests and diesel to interact with psql.
- Link SHORTENER, duh, it'll save the long-link alongside an unique ID that can be accessed by going to the ID's path like:
http(s)://<server link>/<short-link-id> - HTTP validator (will only accept HTTP(s) links).
- User Auth/Register/Login using JWT tokens.
The server sends JSON with the containing error message:
Or the success link id + a hyperlink:

This server is meant to be run as a docker container.
There's a Docker-compose file that can be run with docker-compose up
You can also do RUST_LOG="info" cargo run
URL Parsing - implemented in parser.rs
I'll add here some ideas I'm having for this project.
Implement a function that checks for duplicated short URLs>I used unique PSQL fields for this- Create separate function for the random key generator
- Add functionality to users
- maybe enable users to create custom IDs?
- Make anon. links time-limited, and making user links infinite?
- Public/private links?