This is a straightforward project to create your own URL shortening service using Redis and Rust.
- Ensure you have the prerequisites installed.
- Clone the repository.
- Navigate to the project directory.
- Run the project using Cargo:
cargo run
You can create a short URL by making a POST request to the /api/shorten
endpoint. Here's an example using curl
:
curl -X POST -H "Content-Type: application/json" -d '{"url": "https://www.google.com"}' http://localhost:8080/api/shorten
You can use a short URL by making a GET request to the /api/<key>
endpoint. Here's an example using curl:
curl -v http://localhost:8080/api/<key>