A Christmas-themed REST API built with Hono, Drizzle ORM, and SQLite for the Haxmas Day 4 workshop.
# Install dependencies
bun install
# Create database and tables
bun run db:push
# Start dev server
bun run devvServer runs at http://localhost:3000
Welcome message
List all snowflakes (newest first)
Get a specific snowflake
Create a new snowflake
{
"size": 5 // optional, 1-20, random if not provided
}}Mark a snowflake as melted
Delete a snowflake
Each snowflake gets a randomly selected pattern:
- Classic Six-Pointed - Traditional spike design
- Diamond - Geometric diamond shape
- X-Cross - Cross pattern with center
- Asterisk Burst - Star burst with gaps
- Crystal - Crystal lattice structure
The size parameter (1-10) controls how large the ASCII art renders!
Create snowflakes:
# Random snowflake
curl -X POST http://localhost:3000/api/snowflakes \
-H H "content-type: application/json" \
-d '{}'
# Specific size
curl -X POST http://localhost:3000/api/snowflakes \
-H H "content-type: application/json" \
-d '{"size":10}'List all:
curl http://localhost:3000/api/snowflakesMelt one:
curl -X PATCH http://localhost:3000/api/snowflakes/1/meltBuilt following the Haxmas Day 4 Workshop