Files
emdash-blog-template/.env.example
Kunthawat Greethong 13f775c57c Add DATABASE_URL env var support for EmDash
- Add .env.example documenting SQLite/PostgreSQL/MySQL config
- Add src/lib/db.ts with getDatabaseConfig() helper that parses
  DATABASE_URL and returns the appropriate db config
- Update astro.config.mjs to use getDatabaseConfig() instead of
  hardcoded sqlite path

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-02 16:31:43 +07:00

37 lines
972 B
Plaintext

# EmDash Environment Variables
# Copy this file to .env and fill in your values
# ===========================================
# DATABASE (choose one)
# ===========================================
# SQLite (default - local file)
# DATABASE_URL=file:./storage/data.db
# PostgreSQL
# DATABASE_URL=postgresql://user:password@host:5432/emdash
# MySQL
# DATABASE_URL=mysql://user:password@host:3306/emdash
# ===========================================
# SESSION SECRET (required for production)
# ===========================================
# Generate with: openssl rand -base64 32
# SESSION_SECRET=your-secret-key-here
# ===========================================
# S3 STORAGE (optional - for cloud storage)
# ===========================================
# AWS S3
# S3_BUCKET=my-uploads
# S3_REGION=us-east-1
# AWS_ACCESS_KEY_ID=xxx
# AWS_SECRET_ACCESS_KEY=xxx
# Cloudflare R2
# R2_ACCOUNT_ID=xxx
# R2_ACCESS_KEY_ID=xxx
# R2_SECRET_ACCESS_KEY=xxx
# R2_BUCKET=my-uploads