Skip to content

jamonholmgren/jmn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple URL Shortener

A lightweight URL shortener service built with Bun. Creates short URLs in the format example.com/shortname that redirect to their target URLs.

JMN Screenshot

Features

  • Create short URLs via web form at /new (or whatever you specify)
  • Permanent (301) redirects
  • File-based storage (no database required)
  • Simple password protection for URL creation
  • Clean, mobile-friendly interface

Requirements

Installation

Add the following to your .env file:

PORT=411
URLS_DIR=urls
ADD_PATH=new
PASSWORD=your-password
MAIN_REDIRECT=https://example.com
RATE_LIMIT_MAX=10
RATE_LIMIT_TIME=1

To run:

bun run index.ts

To host

Best place to host is something like Digital Ocean. Set up a droplet and deploy the app there.

If I get around to it, dropship will be an amazing CLI to deploy to a droplet. But it's not ready yet!


This project was created using bun init in bun v1.1.27. Bun is a fast all-in-one JavaScript runtime.

Releases

No releases published

Packages

No packages published