Quick Start
Get up and running with kodkod in under 5 minutes.
Quick Start
This guide will help you scaffold your first kodkod project in under 5 minutes.
Prerequisites
- Node.js 18+ installed
- npm, pnpm, or yarn
- A database (PostgreSQL, MongoDB, or MySQL)
Step 1: Create a New Project
Run the following command in your terminal:
npx kodkod-stack@latest my-apiThis will launch an interactive wizard that guides you through the setup:
- Project Name: Enter your project directory name.
- Framework: Choose between Express, Hono, or Fastify.
- Database: Select PostgreSQL, MongoDB, or MySQL.
- ORM: Pick Prisma or Drizzle for your data layer.
Step 2: Install Dependencies
Navigate to your new project and install dependencies:
cd my-api
npm installStep 3: Configure Your Database
Copy the example environment file and update your database connection string:
cp .env.example .envEdit .env with your database credentials:
DATABASE_URL="postgresql://user:password@localhost:5432/mydb"Step 4: Run Migrations
For Prisma:
npx prisma migrate devFor Drizzle:
npx drizzle-kit pushStep 5: Start the Development Server
npm run devYour API is now running at http://localhost:3000! 🎉
