Skip to content

jminthorne-axc/quarkus-api-example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quarkus API example

Contribute Contribute (nightly)

Quarkus REST API with Hibernate ORM, Panache, RESTEasy, and PostgreSQL. Requires JDK 11.

NOTE: Perfoming a native Quarkus build with the packagenative command fails on Eclipse Che Hosted by Red Hat due to the 7GB usage limit.

Endpoints

Method Endpoint Description
GET /food Lists all Food resources
GET /food/{id} Retrieves the Food resource with the specified ID
GET /food/search/{name} Retrieves a Food resource with the specified name
GET /food/restaurant/{restaurantName} Lists all Food resources with the specified restaurantName
POST /food Creates a Food resource

Running within Dev Spaces

Run in development mode

./mvnw compile quarkus:dev

Navigate to localhost:8080/food to view the pre-imported Food resources.

Run tests only

./mvnw test

Packaging the application

./mvnw clean package

Building a JVM-based image

To build a JVM-based image, ./mvnw clean package but be run beforehand.

To build an image, run:

IMG=<IMAGE> && \
podman build -f src/main/docker/Dockerfile.jvm -t $IMG .

To build and push to the local local OpenShift registry, run the following before building:

podman login --tls-verify=false -u kubeadmin -p $(oc whoami -t) image-registry.openshift-image-registry.svc:5000 && \
IMG=image-registry.openshift-image-registry.svc:5000/openshift/quarkus-api-example

Pushing an image

To push an image, run:

podman push $IMG

To push an image to the local OpenShift registry, run:

podman push --tls-verify=false $IMG

Resources

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 40.8%
  • JavaScript 26.4%
  • CSS 20.6%
  • HTML 12.2%