dev_locally_en.md

March 1, 2025 ยท View on GitHub

Local Development Guide

  1. Clone the repository
  2. Golang development
cd chat; cd api
go install github.com/cosmtrek/air@latest
go mod tidy
# Set environment variables based on your environment
export DATABASE_URL= postgres://user:pass@192.168.0.1:5432/db?sslmode=disable

# Not required if using `debug` model
# export OPENAI_API_KEY=sk-xxx
# export OPENAI_RATELIMIT=100

make serve
  1. Node.js development
cd ..; cd web
npm install
npm run dev
  1. End-to-end testing
cd ..; cd e2e
# Set environment variables based on your environment
export DATABASE_URL= postgres://user:pass@192.168.0.1:5432/db?sslmode=disable

npm install
npx playwright test # --ui 

Ask in issue or discussion if unclear.