http4k demo: IRC

September 30, 2024 ยท View on GitHub

build status

This is a simple IRC clone built with http4k and deployed to Heroku through a fully CD pipeline run on Travis. the full application is 30 lines of code (when imports are excluded).

It uses the following http4k modules and features:

  • http4k core http4k-core
  • Jetty server module http4k-server-jetty including unit-testable Websockets
  • http4k core http4k-cloudnative for configuration
  • Shared behavioural contracts for Unit (offline) and Server (online) testing of Websockets. Ie. 1 contract, reusable across testing scopes.

It is deployed into Heroku here.

In action:

Running it locally

Required environment variables:

CREDENTIALS=<user>:<password>     // for basic auth on the site

Set the above environment variables and run the IrcLauncher class. The app will be available on http://localhost:5000