- Initialize Project and Install Dependencies
npm init -y
npm i express dotenv cors express-validator @prisma/client
npm i -D typescript @types/node @types/express @types/dotenv @types/cors
npm i --save-dev prisma esbuild-register nodemon
- Initialize Prisma
npx prisma init --datasource-provider mysql
- Install dependencies
npm install
- Make sure the database is up to date to the schema
npx prisma db push
- Seed the database (optional)
npx prisma db seed
- Run the server
npm run dev