Skip to content

bun-templates/bun-nextjs-todo

Repository files navigation

Bun + Next.js Todo

A full-stack todo application built with Bun, Next.js, and PostgreSQL.

Quick Start

# Install dependencies
bun install

# Set up database (copy .env.example and add your DATABASE_URL)
cp .env.example .env.local

# Seed the database
bun run db:seed

# Start development server
bun dev

Open http://localhost:3000 in your browser.

Prerequisites

  • Bun installed
  • PostgreSQL database (local or cloud)

Database Setup

You need a PostgreSQL database. You can use:

Add your connection string to .env.local:

DATABASE_URL="postgresql://username:password@hostname:port/database"

Local PostgreSQL (macOS):

brew install postgresql
brew services start postgresql
createdb mydb

Then add to .env.local:

DATABASE_URL="postgresql://$(whoami)@localhost:5432/mydb"

Tech Stack

Scripts

  • bun dev - Start development server
  • bun build - Build for production
  • bun start - Start production server
  • bun run db:seed - Seed the database (creates table and sample data)
  • bun run lint - Run Biome linter
  • bun run format - Format code with Biome

Deployment

For deployment instructions and hosting options, see Bun's deployment guides.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published