Skip to content
/ us Public

a Url shortner with backend in Rust and Frontend in React

Notifications You must be signed in to change notification settings

CodeMan62/us

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

URL Shortener

A URL shortener application built with Rust (backend) and React + TypeScript + Vite + Tailwind CSS (frontend).

Prerequisites

  • Rust and Cargo
  • Node.js and npm
  • PostgreSQL

Backend Setup

  1. Navigate to the backend directory:

    cd backend
  2. Create a PostgreSQL database named url_shortener

  3. Update the .env file with your PostgreSQL credentials:

    DATABASE_URL=postgres://username:password@localhost:5432/url_shortener
    
  4. Run the backend server:

    cargo run

The backend server will start on http://localhost:8080

Frontend Setup

  1. Navigate to the frontend directory:

    cd frontend
  2. Install dependencies:

    npm install
  3. Start the development server:

    npm run dev

The frontend will be available at http://localhost:5173

Features

  • Shorten long URLs
  • Redirect to original URLs using short codes
  • Modern and responsive UI
  • Type-safe API communication
  • PostgreSQL database for URL storage

API Endpoints

  • POST /api/urls - Create a new short URL
  • GET /{short_code} - Redirect to the original URL

I will provide live link Soon

About

a Url shortner with backend in Rust and Frontend in React

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published