Forked from https://github.com/metosin/chassis.git
- Compojure-api & swagger
- API validation (spec/schema)
- component definition (mount)
- metrics (metrics-clojure: forked)
- auth (buddy: forked, waiting for async middleware support)
- env loading (omniconf)
- db migrations (migratus & migratus-lein)
- https://github.com/yogthos/migratus#quick-start-leiningen-2x
- tracing TODO
;; show help
> lein run -- --help
;; set the server port
> SERVER__PORT=3000 lein repl
> lein ring server --server-port 3000
(in-ns 'user)
;; to reload
(do (refresh-all) (go))
Due to dependency on mount
, we run migratus tasks with a lein alias called migrations
instead of migratus
:
;; create a migration
> lein migrations create some_migration_name
> ls resources/migrations
We can also invoke the from the chassis.db
namespace.
;; file upload
curl -XPOST "http://localhost:3000/spec/file" -F [email protected]
Testing is provided by clojure.test
. There's also eftest
runner, providing a task lein eftest
.
Feel free to investigate the following resources:
- https://github.com/metosin/compojure-api/wiki/Testing-api-endpoints
- https://github.com/weavejester/eftest
lein do clean, ring uberjar
java -jar target/server.jar
lein uberjar
lein run --required-option qux --option-from-set bar
REQUIRED_OPTION=qux OPTION_FROM_SET=bar java -jar target/server.jar
lein ring uberwar
Distributed under the Eclipse Public License, the same as Clojure.