Database Configuration
Cepress Generator supports multiple database options with optional Prisma ORM integration. Choose the database that best fits your project requirements.
Supported Databases
Database Setup
SQLite Configuration
SQLite is the default option and requires no additional setup:
SQLite configuration
# .env file
DATABASE_URL=file:./dev.db PostgreSQL Configuration
For PostgreSQL, you'll need a running database server:
PostgreSQL configuration
# .env file
DATABASE_URL="postgresql://username:password@localhost:5432/mydatabase" MySQL Configuration
MySQL configuration
# .env file
DATABASE_URL="mysql://username:password@localhost:3306/mydatabase" Running Migrations
After setting up your database connection, run the initial migration:
Prisma commands
# Generate Prisma client
npx prisma generate
# Run database migration
npx prisma migrate dev --name init
# Open Prisma Studio (optional)
npx prisma studio Environment Variables
Complete environment variable examples for each database:
SQLite
SQLite .env
# .env
PORT=3000
NODE_ENV=development
DATABASE_URL=file:./dev.db
JWT_SECRET=your-super-secret-jwt-key PostgreSQL
PostgreSQL .env
# .env
PORT=3000
NODE_ENV=development
DATABASE_URL=postgresql://username:password@localhost:5432/mydatabase
JWT_SECRET=your-super-secret-jwt-key MySQL
MySQL .env
# .env
PORT=3000
NODE_ENV=development
DATABASE_URL=mysql://username:password@localhost:3306/mydatabase
JWT_SECRET=your-super-secret-jwt-key