Skip to content

Integrant methods for running a Jetty web server

Notifications You must be signed in to change notification settings

biotz/server.http.jetty

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Duct server.http.jetty

Build Status

Integrant multimethods for running a Jetty server for the Duct framework.

Installation

To install, add the following to your project :dependencies:

[duct/server.http.jetty "0.2.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:

{:duct.server.http/jetty
 {:port    3000
  :handler (fn [request]
             {:status  200
              :headers {"Content-Type" "text/plain"}
              :body    "Hello World"})}}

A :logger key may also be specified, which will 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

License

Copyright © 2017 James Reeves

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

About

Integrant methods for running a Jetty web server

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Clojure 100.0%