https://github.com/kkapelon/clojure-http-server
A simple file based HTTP server in Clojure
https://github.com/kkapelon/clojure-http-server
clojure http-server
Last synced: 10 months ago
JSON representation
A simple file based HTTP server in Clojure
- Host: GitHub
- URL: https://github.com/kkapelon/clojure-http-server
- Owner: kkapelon
- Created: 2013-02-11T23:24:47.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2022-12-02T14:57:30.000Z (about 3 years ago)
- Last Synced: 2025-01-10T18:16:38.066Z (12 months ago)
- Topics: clojure, http-server
- Language: Clojure
- Homepage:
- Size: 8.79 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple HTTP server written in Clojure
A simple file based HTTP server in Clojure created for my [Clojure blog post](https://blog.codepipes.com/containers/clojure-lein-docker.html)
It exposes 8080 and serves all file requests for files in the same
directory as the executable. Currently only an example index.html is provided
## How to run locally
`lein run`
then run in a different terminal `curl localhost:8080/index.html`
## How to build and run container
Run
* `docker build . -t my-app` to create a container image
* `docker run -p 8080:8080 my-app` to run it
then run in a different terminal `curl localhost:8080/index.html`