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.
To install, add the following to your project :dependencies
:
[duct.module.pedestal "2.2.0"]
To add this module to your configuration, add a reference to :duct.module/pedestal
(and :duct.server/pedestal
if necessary):
{:duct.profile/base
{:duct.core/project-ns some-api
:duct.server/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.profile/dev #duct/include "dev"
:duct.profile/local #duct/include "local"
:duct.profile/prod {}
:duct.module/pedestal {}}
-
:duct.module/pedestal
can have two options::default?
: whether to insert default-interceptors (default: true):dev?
: whether to insert dev-interceptors (default: true if:duct.core/environment
is:development
or:test
)
-
:duct.server/pedestal
can have two options::base-service
: base service map (default: configuration based on pedestal-service):service
: arbitrary service map which overrides:base-service
configuration
- lagenorhynque/clj-rest-api: an example REST API based on Pedestal & Duct
- lagenorhynque/aqoursql: an example GraphQL API based on Lacinia-Pedestal & Duct
- lagenorhynque/route-guide: an example gRPC API based on Protojure, Pedestal & Duct
Copyright © 2018-2019 Kent OHASHI
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.