https://github.com/duct-framework/server.http.jetty
Integrant methods for running a Jetty web server
https://github.com/duct-framework/server.http.jetty
clojure duct integrant jetty ring
Last synced: 3 months ago
JSON representation
Integrant methods for running a Jetty web server
- Host: GitHub
- URL: https://github.com/duct-framework/server.http.jetty
- Owner: duct-framework
- Created: 2016-12-24T15:57:01.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-10-31T14:02:41.000Z (11 months ago)
- Last Synced: 2025-06-09T14:51:11.448Z (4 months ago)
- Topics: clojure, duct, integrant, jetty, ring
- Language: Clojure
- Homepage:
- Size: 35.2 KB
- Stars: 3
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Duct server.http.jetty [](https://github.com/duct-framework/server.http.jetty/actions/workflows/test.yml)
Integrant multimethods for running a [Jetty][] server for the [Duct][]
framework.[jetty]: https://eclipse.org/jetty/
[duct]: https://github.com/duct-framework/duct## Installation
Add the following dependency to your deps.edn file:
org.duct-framework/server.http.jetty {:mvn/version "0.3.0"}
Or to your Leiningen project file:
[org.duct-framework/server.http.jetty "0.3.0"]
## Usage
The multimethods dispatch off the `:duct.server.http/jetty` key, which
is derived from `:duct.server/http`. The corresponding value is a map
of options for the [Ring Jetty Adapter][], plus a `:handler` key that
takes a handler function.For example:
```clojure
{:duct.server.http/jetty
{:port 3000
:handler #ig/ref :app.example/handler}
:app.example/handler {}}
```A `:logger` key may also be specified, which is be used to log when the
server starts and when it stops. The value of the key should be an
implementation of the `duct.logger/Logger` protocol from the
[duct.logger][] library.[ring jetty adapter]: https://ring-clojure.github.io/ring/ring.adapter.jetty.html
[duct.logger]: https://github.com/duct-framework/logger## License
Copyright © 2024 James Reeves
Distributed under the Eclipse Public License either version 1.0 or (at
your option) any later version.