Liking cljdoc? Tell your friends :D

duct.module.pedestal

Clojars Project Circle CI codecov

A Duct module that adds a web server and useful interceptors of Pedestal to a configuration. This is an alternative to duct/module.web. The default service configuration is based on pedestal-service template.

Installation

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

[duct.module.pedestal "0.1.0"]

Usage

To add this module to your configuration, add a reference to :duct.module/pedestal:

{:duct.core/project-ns some-api
 :duct.core/environment :production

 :duct.module/pedestal
 {:service #:io.pedestal.http{:routes #ig/ref :some-api.routes/routes
                              :port #duct/env ["SERVER_PORT" Int :or 8080]}}

 :some-api.routes/routes {,,,}}

:duct.module/pedestal can have three options:

  • :service: arbitrary service map which overrides the default configuration
  • :default?: whether to insert default-intercetors (default: true)
  • :dev?: whether to insert dev-interceptors (default: true if :duct.core/environment is :development)

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close