This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> boot hello | |
Hello, Howard | |
> boot hello -g Bonjour | |
Bonjour, Howard | |
> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> boot hello --help | |
Prints a greeting. | |
Options: | |
-h, --help Print this help info. | |
-g, --greeting GREETING GREETING sets greeting to use. | |
-n, --name NAME NAME sets name to greet. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns example.tasks | |
(:require | |
[boot.core :refer :all] | |
[boot.util :refer [info]])) | |
(deftask hello | |
"Prints a greeting." | |
[g greeting GREETING str "Greeting to use." | |
n name NAME str "name to greet."] | |
(with-pass-thru _ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
boot pom jar install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:lein-plugin-runtime {:dependencies [[leiningen-core "2.6.1"]]} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn customers [db ch] | |
(let [db-ch (exec-customer-query db :all)] | |
(go-loop [] | |
(when-let [customer (<! db-ch)] | |
(>! ch customer) | |
(recur))))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn customers [db] | |
(let [ch (chan 100) | |
db-ch (exec-customer-query db :all)] | |
(go-loop [] | |
(when-let [customer (<! db-ch)] | |
(>! ch customer) | |
(recur))) | |
ch)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(go-loop [n 0] | |
(when-let [x (<! input-ch)] | |
(>! output-ch x) | |
(recur (inc n)) | |
n)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(let [n (atom 0)] | |
(go-loop [] | |
(when-let [x (<! ch)] | |
(>! next-ch x) | |
(swap! n inc) | |
(recur)) | |
@n)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(s/defschema WebServerConfig | |
{:port s/Int | |
(s/optional-key :max-threads) s/Int}) |