bootique-examples / bootique-jetty-examples

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

verify

Bootique 3.x Jetty Examples

This is an example Bootique Jetty app.

Different Git branches contain example code for different versions of Bootique:

Prerequisites

To build and run the project, ensure you have the following installed on your machine:

  • Java 11 or newer
  • Maven

and then follow these steps:

Checkout

git clone git@github.com:bootique-examples/bootique-jetty-examples.git
cd bootique-jetty-examples

Build, test and package

Run the following command to build the code, run the tests and package the app:

mvn clean package

Notice, how the tests started Jetty on the spot on a random port and executed real requests.

Run

The following command prints a help message with supported options:

java -jar target/bootique-jetty-examples-3.0.jar
NAME
      bootique-jetty-examples-3.0.jar

OPTIONS
      -c yaml_location, --config=yaml_location
           Specifies YAML config location, which can be a file path or a URL.

      -h, --help
           Prints this message.

      -H [prefix], --help-config[=prefix]
           Prints information about application modules and their configuration
           options. Optionally, you can provide a 'prefix' argument to print only
           the specified config.

      -s, --server
           Starts Jetty server.

Start the server with the -s (--server) command:

java -jar target/bootique-jetty-examples-3.0.jar -s

Go to http://localhost:8080/ and you should see an HTML page served from Jetty, with links to the URLs served via "dynamic" servlets and filters.

About

License:Apache License 2.0


Languages

Language:Java 81.5%Language:CSS 10.1%Language:HTML 8.4%