Follow these steps to reproduce the project
- npm init -y
- npm i --save-dev prisma nodemon
- npm i @prisma/client
- npx prisma init
- Fill in prisma->prisma.prisma file with models and run the following command to generate the tables in DB:
npx prisma generate
-
Create a file "seed.js" inside prisma folder
Add the following section to package.json
"type": "module", "prisma": { "seed": "node prisma/seed.js" }
RUN: npx prisma db seed
- We will use FASTIFY instead of Express since it is simpler for creating APIs
> npm i fastify dotenv @fastify/cookie @fastify/cors @fastify/sensible
Follow these steps to reproduce the project
- CD into the client folder and run npx create-react-app . to create a new React application
- Install axios: npm i axios
- npm i react-router-dom react-icons