An open API service indexing awesome lists of open source software.

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

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`