https://github.com/nextjournal/simple-http-server
A simple http server implemented as thin Clojure wrapper around `SimpleWebServer` from JEP 408 for JDK 18+.
https://github.com/nextjournal/simple-http-server
Last synced: 9 months ago
JSON representation
A simple http server implemented as thin Clojure wrapper around `SimpleWebServer` from JEP 408 for JDK 18+.
- Host: GitHub
- URL: https://github.com/nextjournal/simple-http-server
- Owner: nextjournal
- License: isc
- Created: 2023-06-27T10:02:39.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-02T14:58:32.000Z (over 2 years ago)
- Last Synced: 2025-04-11T21:09:12.186Z (9 months ago)
- Language: Clojure
- Homepage:
- Size: 2.93 KB
- Stars: 25
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nextjournal.simple-http-server
A thin dependency-free simple http static server built on
`SimpleWebServer` from JDK 18+ [JEP 408](https://openjdk.org/jeps/408).
## Usage
From the Clojure REPL:
``` clojure
(require '[nextjournal.simple-http-server :as http])
(http/serve! {})
(http/serve! {:port 7890 :path "test/public" :browse true :output-level :verbose})
```
Use it from your shell using `clojure -X`:
``` shell
clj -Sdeps '{:deps {io.github.nextjournal/simple-http-server {:git/sha "96213f283796aa3a06ca9a8f455aaab058d3f105"}}}' \
-X nextjournal.simple-http-server/serve! :browse true
```