Skip to content

Latest commit

 

History

History
107 lines (68 loc) · 1.46 KB

File metadata and controls

107 lines (68 loc) · 1.46 KB

Clojure http-kit Examples

Configuration

Add 127.0.0.1 api.localhost into your /etc/hosts.

Leiningen

Running unit tests

To run unit tests, execute:

lein test

Running the application

To run the application, type:

lein run

You can run a specific file by running:

lein run -m clojure-http-kit-examples.core

Generating an uberjar

To generate an uberjar, run:

lein uberjar

The generated Jar will be located in target/uberjar directory.

Executing the REPL

To execute the Lein REPL, type:

lein repl

If you want to load a file into the REPL, use load-file function. Example:

(load-file "src/clojure-http-kit-examples/core.clj")

To invoke main function you can do the following:

(clojure-http-kit-examples.core/-main)

Formatting code

You can format code by using the following command:

lein format # or
lein format-fix

Running a Linter

You can use a linter by typing:

lein lint # or
lein lint-fix

Reader tools

#spy/p: Pretty Print reader tool. Example:

#spy/p (my-form (System/getenv "USER"))

#spy/d: Debug reader tool. Example:

#spy/d (my-form (System/getenv "USER"))

#spy/t: Trace reader tool. Example:

#spy/t (my-form (System/getenv "USER"))

Test watch mode

lein prism

References