- Task 1 → The server connects to MongoDB (local or online).
- Task 2 → You can see the user model created.
- Task 3 → There is a controller to create the user.
- Task 4 → There is a controller for deleting the user.
- Task 5 → There is a controller for returning the user.
- Task 6 → There is a controller to update the user.
- Task 7 → You can bring up the server and perform the above actions.
- Extra → Add test using Insomnia / Postman.
- Create a MongoDB.
- Clone the repository:
git clone https://github.com/annStein/mongo-db.git
- Run the application:
./gradlew bootRun -DCONNECTION_STRING=<YOUR MONGODB CONNECTION STRING>
- Create a MongoDB.
- Clone the Repository.
git clone https://github.com/annStein/mongo-db.git
- Build the app:
./gradlew build
- Create Docker image:
docker build -t foo/bar .
- Run the image:
docker run -e "CONNECTION_STRING=<YOUR MONGODB CONNECTION STRING>" -p 8080:8080 -t foo/bar
A postman collection is available: Getting Started MongoDB.postman_collection.json
.
Unit tests are available. They will be triggered through GitHub Actions after every push and for every pull request.
The service was built following the clean architecture principle.
All endpoints are documented and can be tried using swagger: http://localhost:<port>/swagger-ui.html