Mysql(Drizzle) Provider
This provider sets up MySQL connectivity with Drizzle ORM for Express projects, including environment validation, a database client, and a logger.
Features
- Type-safe environment validation with Zod
- Ready-to-use Drizzle client for MySQL
- Pino logger configured for dev and production
Installation Guide
npx servercn-cli add pr mysql-drizzleFile Structure
MVC
-
src/configs/env.ts -
src/configs/db.ts -
src/utils/logger.ts
Feature
-
src/shared/configs/env.ts -
src/db/db.ts -
src/shared/utils/logger.ts
Environment Configuration
src/configs/env.ts
Database Client
src/configs/db.ts
Logger
src/utils/logger.ts