Add jetty
This commit is contained in:
parent
0b52758820
commit
ccca07d511
4 changed files with 18 additions and 4 deletions
4
deps.edn
4
deps.edn
|
|
@ -26,7 +26,9 @@
|
|||
datascript/datascript {:mvn/version "1.0.1"}
|
||||
http-kit/http-kit {:mvn/version "2.5.0"}
|
||||
babashka/clojure-lanterna {:mvn/version "0.9.8-SNAPSHOT"}
|
||||
org.clojure/math.combinatorics {:mvn/version "0.1.6"}}
|
||||
org.clojure/math.combinatorics {:mvn/version "0.1.6"}
|
||||
ring/ring-core {:mvn/version "1.8.1"}
|
||||
ring/ring-jetty-adapter {:mvn/version "1.8.1"}}
|
||||
:aliases {:main
|
||||
{:main-opts ["-m" "babashka.main"]}
|
||||
:profile
|
||||
|
|
|
|||
|
|
@ -21,7 +21,9 @@
|
|||
[cheshire "5.10.0"]
|
||||
[nrepl/bencode "1.1.0"]
|
||||
[borkdude/sci.impl.reflector "0.0.1-java11"]
|
||||
[org.clojure/math.combinatorics "0.1.6"]]
|
||||
[org.clojure/math.combinatorics "0.1.6"]
|
||||
[ring/ring-core "1.8.1"]
|
||||
[ring/ring-jetty-adapter "1.8.1"]]
|
||||
:profiles {:feature/xml {:source-paths ["feature-xml"]
|
||||
:dependencies [[org.clojure/data.xml "0.2.0-alpha6"]]}
|
||||
:feature/yaml {:source-paths ["feature-yaml"]
|
||||
|
|
|
|||
8
src/babashka/impl/jetty.clj
Normal file
8
src/babashka/impl/jetty.clj
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
(ns babashka.impl.jetty
|
||||
(:require [ring.adapter.jetty :as http]
|
||||
[sci.core :as sci]))
|
||||
|
||||
(def jns (sci/create-ns 'ring.adapter.jetty nil))
|
||||
|
||||
(def jetty-namespace
|
||||
{'run-jetty (sci/copy-var http/run-jetty jns)})
|
||||
|
|
@ -19,6 +19,8 @@
|
|||
[babashka.impl.datafy :refer [datafy-namespace]]
|
||||
[babashka.impl.error-handler :refer [error-handler]]
|
||||
[babashka.impl.features :as features]
|
||||
[babashka.impl.http-client :as http-client]
|
||||
[babashka.impl.jetty :as jetty]
|
||||
[babashka.impl.pods :as pods]
|
||||
[babashka.impl.pprint :refer [pprint-namespace]]
|
||||
[babashka.impl.process :refer [process-namespace]]
|
||||
|
|
@ -29,7 +31,6 @@
|
|||
[babashka.impl.test :as t]
|
||||
[babashka.impl.tools.cli :refer [tools-cli-namespace]]
|
||||
[babashka.nrepl.server :as nrepl-server]
|
||||
[babashka.impl.http-client :as http-client]
|
||||
[babashka.wait :as wait]
|
||||
[clojure.edn :as edn]
|
||||
[clojure.java.io :as io]
|
||||
|
|
@ -392,7 +393,8 @@ If neither -e, -f, or --socket-repl are specified, then the first argument that
|
|||
'clojure.datafy datafy-namespace
|
||||
'clojure.core.protocols protocols-namespace
|
||||
'babashka.process process-namespace
|
||||
'babashka.http-client http-client/http-client-namespace}
|
||||
'babashka.http-client http-client/http-client-namespace
|
||||
'ring.adapter.jetty jetty/jetty-namespace}
|
||||
features/xml? (assoc 'clojure.data.xml @(resolve 'babashka.impl.xml/xml-namespace))
|
||||
features/yaml? (assoc 'clj-yaml.core @(resolve 'babashka.impl.yaml/yaml-namespace)
|
||||
'flatland.ordered.map @(resolve 'babashka.impl.ordered/ordered-map-ns))
|
||||
|
|
|
|||
Loading…
Reference in a new issue