npm i zod
https://www.npmjs.com/package/zod
npm install joi
https://www.npmjs.com/package/joi
npm i express
npm install --save-dev @types/express
https://www.npmjs.com/package/express
npm install --save-dev prisma
https://www.prisma.io/
npx prisma init
npm install @prisma/client
npx prisma generate
npx prisma migrate dev --create-only : to see the changes
npx prisma migrate dev : to do migrate
npm install bcrypt
npm install --save-dev @types/bcrypt
https://www.npmjs.com/package/bcrypt
npm install uuid
npm install --save-dev @types/uuid
https://www.npmjs.com/package/uuid
npm install --save-dev jest @types/jest
https://www.npmjs.com/package/jest
"scripts": {
"test": "jest -i"
}
jest run paralel, to avoid that (db race condition), add -i
https://stackoverflow.com/questions/42827054/how-do-i-run-a-single-test-using-jest
./node_modules/jest/bin/jest
npm test
npx jest for all test
npx jest test/user-api.test.js
npx jest --runTestsByPath test/api-test/user-api.test.js for test in file
npx jest --testNamePattern "should register user" or npx jest -t "should register user"
npm install --save-dev babel-jest @babel/preset-env
https://babeljs.io/setup#installation
{
"scripts": {
"test": "jest"
},
"jest": {
"transform": {
"^.+\\.[t|j]sx?$": "babel-jest"
}
}
}
Create babel.config.json configuration file add:
{
"presets": ["@babel/preset-env"]
}
npm install --save-dev supertest @types/supertest
https://www.npmjs.com/package/supertest
npm i cookie-parser
npm install connect-timeout
npm i express-fileupload
npm install file-type
npm i eslint --save-dev
https://eslint.org/
extention on vs code eslint
create configuration file eslint.config.js
npm i ioredis
https://www.rabbitmq.com/tutorials/tutorial-one-javascript
npm install amqplib
https://kafka.js.org/
npm install kafkajs
https://www.npmjs.com/package/jsonwebtoken
npm i jsonwebtoken