Thanks to visit codestin.com
Credit goes to github.com

Skip to content

astamur/javalin-mongodb-app

Repository files navigation

An example of web-application using Javalin and MongoDB

Build

To compile and build artifacts run a following gradle command (Docker should be installed on your machine):

./gradlew build buildDockerImage

Run and test

To see the results you may start application and database by using docker-compose:

docker-compose up -d

To stop and delete this stack execute:

docker-compose down

Requests examples

Create new post:

curl -v localhost:8080/posts -d '{"subject": "Greeting post", "text": "Hello! This is a greeting post.", "categories": ["other"]}'

Read existing post:

curl localhost:8080/posts/{ID}

Update existing post:

curl -X PUT -v localhost:8080/posts/{ID} -d '{"subject": "Greeting post. UPDATED", "text": "Hello! This is a greeting post. UPDATED", "categories": ["new_one"]}'

Delete existing post:

curl -X DELETE -v localhost:8080/posts/{ID}

About

A simple example of a web-application using Javalin micro-framework and MongoDB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published