Fork me on GitHub
#babashka
<
2021-10-02
>
borkdude21:10:17

A router library that works with #babashka's built in http server:

(require '[babashka.deps :as deps])

(deps/add-deps '{:deps {org.clojars.askonomm/ruuter {:mvn/version "1.0.1"}}})

(require '[ruuter.core :as ruuter])

(def routes [{:path "/"
              :method :get
              :response {:status 200
                         :body "Hi there!"}}])

(ruuter/route! routes {:port 8082})

@(promise)

borkdude21:10:30

Fresh off the press in #announcements - by @asko304