Review
- 2023-03-26 10:22
一、Introduction #
- Koa
- Prisma
- MySQL
- TypeScript
- ESBuild
- Jest
- ESLint
- Nx
- Prettier
- PNPM
二、项目配置 #
npx create-nx-workspace@latestpnpm install
pnpm add prisma -D
pnpm add @prisma/client
npx prisma init --datasource-provider mysql
npx prisma generateconfig .env
DATABASE_URL="mysql://root:123456@192.168.0.206:3306/test"Pull the schema from an existing database, updating the Prisma schema
npx prisma pullPush the Prisma schema state to the database
npx prisma db push配置Koa中间件
pnpm add koa