Gered
aa1aa76bbf
this is more flexible, allowing a few http-kit functions to be called against it (including one to stop http-kit), versus the alternate return type which is just a simple function that can be called to stop http-kit this is ALSO what i thought i had done already, thus why the stop function found below in this very same defstate is written to call `http-kit/server-stop!` which won't actually work without setting legacy-return-value? to false. oopsie! :-) |
||
---|---|---|
resources/leiningen/new/simple_web_service | ||
src/leiningen/new | ||
.gitignore | ||
LICENSE | ||
project.clj | ||
README.md |
Leiningen Template: Simple Clojure Web Service
A Leiningen template intended for creating new Clojure web service projects utilizing reitit.
This template primarily exists for my own personal use, so some stuff is definitely more oriented towards my own particular preferences regarding setup and organization of a Clojure project.
Usage
$ lein new net.gered/simple-web-service [your-project-name-here]
The resulting project starts up via a main
function and during startup expects to be able to read an EDN
configuration file located in the current working directory called config.edn
.
The project can be run simply by:
$ lein run
A nREPL server will be started which can be connected to on port 7000 (configured via the aforementioned config.edn
).
The web service's endpoints will be accessible over port 8080 (again, configured via the aforementioned config.edn
).
The Swagger UI page will be available at /api-docs/
e.g. http://localhost:8080/api-docs/
License
Copyright © 2021 Gered King
Distributed under the the MIT License. See LICENSE for more details.