Just a for fun project to practice Java with Spring Boot. The project purpose is provide a sample http api, saving the data in MongoDB, testing and building a docker image.
Ensure the prerequisites and run the make targets.
These tools must be installed:
make build
: Builds a .jar on /targets directorymake clean
: Removes the /targets directorymake start
: Starts the project locallymake start-mongodb
: Starts a MongoDB containermake stop-mongodb
: Stops and removes the MongoDB containermake test
: starts a MongoDB container, test and removes the MongoDB containermake docker-build
: builds a docker imagemake docker-run
: runs the built imagemake docker-compose-up
: runs the project and the MongoDB with Docker Compose
curl -v 'localhost:11000/saiyajin?name=goku'
curl -0 -v -XPOST -H 'content-type: application/json' \
'localhost:11000/saiyajin' \
-d @- << EOF
{
"name": "Vegeta",
"age": 48,
"maxLevel": 15000,
"skills": ["Final Flash", "Galick Gun"]
}
EOF
``