Liking cljdoc? Tell your friends :D

pathom-pedestal

Clojars Project cljdoc badge

A library to integrate pathom and pedestal

Usage

This library provide one main function, pathom-routes, which return a set of Pedestal routes, using the table syntax

(ns example.core
 (:require
   [io.pedestal.http :as http]
   [io.pedestal.http.route :as route]
   [pathom.pedestal :refer [pathom-routes]]))


(def routes
  (route/expand-routes (pathom-routes {:oge? true :parser parser})))

(defn create-server []
  (http/create-server
   {::http/routes routes
    ::http/type   :jetty
    ::http/port   8890}))

(http/start (create-server)))

See API docs for a list of valid options

For convenience, a helper function, make-parser, is also provided.

Example project

See the example directory. To run the example:

clj -A:dev

Go to http://localhost:8890/oge and try some query. E.g.: [{[:tv-show/id :bcs] [:tv-show/title]}]

Can you improve this documentation?Edit on GitHub

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

× close