This project provides a starter kit for Apache TomEE Eclipse MicroProfile projects hosted on Platform.sh. It includes a minimalist application skeleton that is intended for you to use as a starting point and modify for your own needs, along with the Platform.sh Config Reader to simplify accessing Platform.sh environment variables.
Apache TomEE is the Eclipse MicroProfile implementation that uses several Apache Project flavors such as Apache Tomcat, Apache OpenWebBeans and so on.
To compile:
mvn clean package tomee:exec
To start:
java -jar target/ROOT-exec.jar
- Install docker: https://www.docker.com/
- https://store.docker.com/images/mongo
- Run docker command
- Run MongoDB: verify MongoDB image name with the command
docker images
, it can be mongodb or mongo, and then execute this commanddocker run -d --name mongodb-instance -p 27017:27017 mongo
curl --location --request POST 'http://localhost:8080/animals' \
--header 'Content-Type: application/json' \
--header 'Content-Type: application/javascript' \
--data-raw '{"name": "tomee"}'
curl --location --request GET 'http://localhost:8080/animals'