Skip to content

Problem passing jetty adapter options as :adapter map using ring by server-headless  #206

Description

@erkkikeranen

According to the README you can provide the following as general options to project.clj:

:adapter - A map of options to be passed to the Ring adapter. This has no effect if you're deploying your application as a war-file.

Here's my project.clj

:ring {
  :handler myapp.states.ring/ap
  :adapter {:configurator (ring-jetty-ws.ws/configurator myapp.handlers.ws/ws-handler)}
  :init myapp.core/setup
  :destroy myapp.core/teardown
  :port 3000
  :nrepl {:start? true :port 7000}}

When running with the command lein ring server-headless, jetty starts but doesn't run the configurator so I can't get websocket endpoints/servlets running.

In the compiled artifact everything works when jetty is started as follows:

(run-jetty myapp.states.ring/app
  {:port 3000
   :join? true
   :configurator (ring-jetty-ws.ws/configurator myapp.handlers.ws/ws-handler)})

Maybe I've misunderstood something from the documentation how the :adapter map is supposed to work? Is this working as intended?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions