This repository is a NodeJS Express rest api template with jwt authentication, unit test coverage, and mongodb database. It is written in Typescript. Its documentation is made with postman and the collection is at the root of the project. It also has a quality gate with sonarcloud.
npm install
Create .env file with your values and also create .env.test for testing propouse
MONGO_PREFIX=mongodb
MONGO_USER=dbAdmin
MONGO_PASSWORD=secret
MONGO_PATH=@localhost:27017
MONGO_DATABASE=api-nodejs
JWT_SECRET=jwt_secret
PORT=3000
NODE_ENV=dev
npm run dev
If you use visual code as a code editor, you can use Node: Nodemon or Jest All settings for debugging when the server is running or when you want to debug test cases respectively.
npm run test