Skip to content

AllStackDev1/URL-Shortener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

URL Shortener

A simple and efficient URL shortener service built in Rust.

Features

  • Shortens long URLs into custom or auto-generated codes
  • Tracks access count, expiration, and usage metadata
  • Supports JSON API requests and query filtering
  • Built with Actix Web and SQLx

Getting Started

  1. Clone the repo

    git clone https://github.com/your-username/url-shortener.git
    cd url-shortener
  2. Set up your environment

    • Copy .env.example to .env and configure your database URL.
  3. Run migrations

    sqlx migrate run
  4. Start the server

    cargo run

API Overview

  • POST /shorten - Create a new shortened URL
  • GET /{code} - Redirect to the original URL
  • GET /urls - List and filter shortened URLs

Tech Stack

  • Rust
  • Actix Web
  • SQLx (PostgreSQL)
  • Serde + Validator

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published