
This project is a sample todo application to try these stack:
- Web application framework
- Database
- Validation
- Test
- CSS
- Runtime
- Development tool
- misc
- neverthrow
- Result type for TypeScript / To Handle expected errors
First, clone this repository.
git clone https://github.com/kfly8/sample-todoapp-honox-zod-drizzle.git
cd sample-todoapp-honox-zod-drizzle
Next, manually install or using docker.
Case: Manually install
Bun version 1.2 or higher is required.
# Install dependencies
bun install
# Database setup for development
bunx --bun drizzle-kit migrate
# Database setup for test
env NODE_ENV=test bunx --bun drizzle-kit migrate
# Start the development server
bun run dev
Case: Using Docker
docker build --pull -t sample-todoapp .
docker run -d -p 3000:3000 sample-todoapp
- Update schema
edit app/infra/db/schema.ts
- Create a new migration
bunx drizzle-kit generate
- Apply the migration
These processes is option 3 in the following document: https://orm.drizzle.team/docs/migrations