Skip to content

About

URL shortener REST API built with Hono + Bun + SQLite

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

17 Commits

Folders and files

Repository files navigation

Hono URL Shortener

Read in Russian | English

Lightweight URL Shortener REST API built with Hono, Bun, Valibot, and OpenAPI.

Features

  • Validation: Runtime schema validation with Valibot.
  • OpenAPI / Scalar: Self-documenting API at /scalar (disabled in production).
  • Errors: Standardized JSON error format ({ "error": "..." }).
  • Tests: Integrated E2E suite via bun:test.

Quick Start

bun install 
bun dev

Scripts

  • bun dev — Development server with watch mode
  • bun start — Production server
  • bun test — Run unit & E2E tests

API Reference

Method Endpoint Description
POST /links Create a shortened URL
GET /links List all shortened URLs
GET /links/:code/stats Get link click statistics
DELETE /links/:code Delete a shortened link
GET /:code Redirect to original URL (302)

Made with ❤️ by Quarnel

About

URL shortener REST API built with Hono + Bun + SQLite

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages