- ✔ Express framework
- ✔ MVC architecture
- ✔ TypeScript support
- ✔ Prisma ORM (MySQL)
- ✔ Customize error, log and catch all error
- Swagger document support
- Zod schema validation
- Rate limit
- Schema validation with zod
- Jest unit test
Pull the code and create .env
in server root directory, the content likes below
DATABASE_URL="mysql://{username}:{password}@localhost:3306/beautiful-todos?connection_limit=5"
If you use Postgres, please change the connection link
Enter the server directory and execute the below command
npm install
Enter the server directory and execute the below command
npm start
- npm init -y
- npm install express
- npm i -D typescript ts-node nodemon @types/node @types/express
- npx tsc --init
- touch index.ts
- npm install -D prisma
- npm install prisma-client | npx prisma generate
- npx prisma db push: Outside prisma migration system)
- npx prisma migrate dev --name <your_migration_name>: After updating the Prisma schema, generate a new migration
- npx prisma migrate deploy: Apply the generated migration to bring your database schema in sync
- npx prisma migrate dev: Check if the drift issue persists
- npx prisma generate: Regenerate the Prisma Client to reflect the changes in your schema