MAKE_SHORT_URL is a web application for creating short URLs, similar to TinyURL, using actix_web
with redis
on Docker.
base62.rs
: Base62 encoding logic.redis_conn.rs
: Redis interaction, setup, and event handling.server.rs
: Main application entry, server setup, redis integrationtest.rs
: Project tests.
handle_button.js
: Event listener for form submission and Button click handling.home.html
: Homepage HTML.style.css
: Homepage styling.
- Localhost Mapping: Ensure no conflicts in
/etc/hosts
(Unix) orC:\Windows\System32\drivers\etc\hosts
(Windows) and mapus.ex
to127.0.0.1
.- For Unix-based systems (Linux/macOS):
sudo bash -c 'echo "127.0.0.1 us.ex" >> /etc/hosts'
- For Windows:
Add-Content -Path C:\Windows\System32\drivers\etc\hosts -Value "127.0.0.1 us.ex"
- For Unix-based systems (Linux/macOS):
- Docker Installation: Get Started with Docker.
- Clone repo and Run:
git clone https://github.com/DirtyVoid/MAKE_SHORT_URL.git cd MAKE_SHORT_URL docker build --no-cache -t my-url-shortener . docker run -p 80:80 my-url-shortener
Access http://us.ex in a browser to shorten URLs. Adjust TTL in redis_conn.rs to change URL expiration. At the moment untested on Unix