Skip to content

Girish21/cf-url-shortener

Repository files navigation

Short URL Generator

🧪 CI 🕊 Deploy

A simple Short URL generator using Cloudflare Workers + KV + Remix.

Checkout the deployed version here url.vgirish.net.

Tech Stack

  • Remix
  • Cloudflare Workers
  • Cloudflare KV
  • Tailwind CSS
  • Turbo Repo
  • ESLint
  • Prettier

API

You can also use the API to generate a short URL by making a POST request

ClientSample Code
curl
curl -XPOST  -H "Content-Type: application/json" -d '{"url": "https://www.google.com/"}'
        
fetch
fetch(
  'https://url.vgirish.net/generate',
  {
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({url: "https://www.google.com/"})
  }
)