• Townie
    AI
  • Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
cocodrilette

cocodrilette

shorturl

Public
Like
shorturl
Home
Code
2
README.md
H
main.tsx
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
Code
/
Search
main.tsx
https://cocodrilette--11c34fd0278311f0b46e569c3dd06744.web.val.run
README.md

πŸ”— Short URL Generator

A simple, serverless short URL generator built on Val Town using React and SQLite.

Features

  • 🌐 Generate short URLs for any long URL
  • πŸ’Ύ Persistent storage using SQLite
  • πŸš€ Instant redirection
  • 🎨 Clean, minimal React interface

How It Works

  1. Enter a long URL in the input field
  2. Click "Generate Short URL"
  3. Receive a unique, short URL
  4. Share and use the short URL, which will redirect to the original link

Technical Details

  • Built with React (client-side)
  • Uses Val Town's SQLite for URL mapping storage
  • Generates a random 5-character short code
  • Serverless deployment on Val Town

Example

Long URL: `https://very-long-url.com/with-many-parameters\` Short URL: `https://your-val-domain.web.val.run/ab123\`

Limitations

  • Short codes are randomly generated (potential for rare collisions)
  • No custom short code option
  • URLs are stored indefinitely

Source

[View Source](${import.meta.url.replace("esm.town", "val.town")})

HTTP
  • main.tsx
    cocodrilette--11…44.web.val.run
Code
README.md
H
main.tsx
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Terms of usePrivacy policyAbuse contact
Β© 2025 Val Town, Inc.