Simple shorten URL Application using Rust (Rocket + Redis)
- Clone this project
git clone git@github.com:huunguyencs/rust_shorten_url.git
- Install & run redis. You can run redis with docker:
docker run -p 6379:6379 -d redis
- Run project:
cargo run
- Shorten url:
POST: http://127.0.0.1:8000
Body:
{
"ori_url": "<your_url>"
}
Response will include url shorted. Example:
Shorten successful to http://127.0.0.1:8000/0tTGhiP