Running the Example

Ensure that you have installed the prerequisites.

  1. Build the Docker image:

    $ node --run docker:build
  2. Start the image (HTTP server):

    $ node --run docker:start
  3. Stop the image:

    $ node --run docker:stop
  4. Create a self-signed certificate:

    $ node --run cert:create
  5. Start the image (HTTPS server):

    $ node --run docker:start:secure

Example REST API

The example exposes two endpoints:

/

returns a randomly generated user in JSON format

/-/health/liveness

liveness probe

$ curl http://localhost:3000/
$ curl http://localhost:3000/-/health/liveness
$ curl --insecure https://localhost:3000/
$ curl --insecure https://localhost:3000/-/health/liveness