- go to folder
backend
- install packages, run
npm i
- created
.env
file based on the example- pdate mongodb password connection
- update JWT_SECRET_KEY. we can use https://randomkeygen.com
- run
npm run dev
- go to folder
frontend
- install package, run
npm i
- created
.env
based on the example and adjust accordingly - run
npm run dev
- create folder called
backend
- run
npm init
- run
npm i express dotenv cors mongodb mongoose
- run
npm i nodemon typescript ts-node @types/mongodb @types/cors @types/express
- delete folder frontend if necessary
- run
npm create vite@latest
- input
frontend
as name project, choosereact
andTypescript + SWC
- login to https://cloud.mongodb.com/
- create new database
- create env for MONGGODB_CONNECTION_STRING
- update backend to acccept connection string
- go to frontend, run
npm install -D tailwindcss postcss autoprefixer
- run
npx tailwindcss init -p