This project is a basic NestJS application that demonstrates the creation of a RESTful API for language proficiency tests.
-
Basic Authentication: The API ensures secure endpoints by implementing basic authentication, allowing only authorized users to access protected resources.
-
Parameter Validation: Built-in validation mechanisms guarantee the accuracy and reliability of incoming request parameters.
-
MongoDB Integration: MongoDB serves as the chosen database solution, seamlessly integrated into the project through the mongoose ORM for streamlined data management.
-
CRUD Operations: The API offers Create, Read, Update, and Delete functionality for questions and their corresponding answer options.
-
Docker Integration: The project is designed to be Docker-friendly, facilitating easy deployment and management of the application and its dependencies.
-
Swagger API documentation
$ npm install
# Start the MongoDB container
$ docker-compose up -d
# Start the NestJS application in development mode
$ npm run start:dev
To open the Swagger UI navigate to http://localhost:3000/api
$ npm run test
$ npm run test:e2e
$ npm run test:cov
$ docker exec -it 'container name' bash
$ mongosh
$ use admin
$ db.auth("root", "123456");
$ show dbs
$ use languagetestdb
$ db.MultipleChoiceQuestion.find()