Backend for the submission runner of the codes.clj contest
To open a nrepl
clj -M:nrepl
To open a nrepl with all test extra-deps on it
clj -M:test:nrepl
To open a dev nrepl
clj -M:dev:nrepl
Then, eval for instrument malli. Malli instrumentation enables input/output validation and clj-kondo lint annotations.
(start)
To run unit tests inside ./test/unit
clj -M:test :unit
To run integration tests inside ./test/integration
clj -M:test :integration
To run all tests inside ./test
clj -M:test
To generate a coverage report
clj -M:test --plugin kaocha.plugin/cloverage
clj -M:clojure-lsp format
clj -M:clojure-lsp clean-ns
clj -M:clojure-lsp diagnostics
To create a new migration with a name
clj -M:migratus create migration-name
To execute all pending migrations
clj -M:migratus migrate
To rollback the latest migration
clj -M:migratus rollback
See Migratus Usage for documentation on each command.
Start containers with postgres user: postgres, password: postgres, hostname: db, port: 5432
and pg-admin email: [email protected], password: pg, port: 5433
docker-compose -f docker/docker-compose.yml up -d
Stop containers
docker-compose -f docker/docker-compose.yml stop
First you need to have the database running, for this you can use the docker command in the step above.
You can start a repl open and evaluate the file src/microservice_boilerplate/server.clj
and execute following code:
(start-system! (build-system-map))
You can generate an uberjar and execute it via java in the terminal:
# genarate a target/service.jar
clj -T:build uberjar
# execute it via java
java -jar target/service.jar
This is free and unencumbered software released into the public domain.
For more information, please refer to http://unlicense.org