Skip to content

Latest commit

Β 

History

History
95 lines (72 loc) Β· 1.93 KB

README.md

File metadata and controls

95 lines (72 loc) Β· 1.93 KB

Javongo β˜•πŸƒ

Gitmoji

Springboot CRUD api using containerized mongoDB. Feel free to use it as an example for your projects.

Running

Make sure ports 27017 & 8080 are available.

mongoDB

javongo/

mkdir -p mongodb/db
docker-compose up -d

Springboot

javongo/javongo/

./gradlew bootRun

API Reference

Server should be running on localhost:8080.

Get all javongos

  GET /javongos

Get javongo

  GET /javongo/${id}
Parameter Type Description
id string Required. Id of javongo to fetch

Add javongo

  POST /javongo

Request body

{
  "message": "<your-javongo-message>"
}
Parameter Type Description
message string Required. Message of new javongo

Update javongo

  PUT /javongo/${id}

Request body

{
  "message": "<your-javongo-message>"
}
Parameter Type Description
id string Required. Id of javongo to update
message string Required. Message of updated javongo

Remove javongo

  DELETE /javongo/${id}
Parameter Type Description
id string Required. Id of javongo to remove

Stopping

javongo/

docker-compose down -v

You can kill the springboot process, pressing Ctrl + c in the terminal where the procces is running.

Made with πŸ’— and </>.