Files
skirmish/src/book/core.clj
T

15 lines
444 B
Clojure

(ns book.core
(:require [book.cli.core]
[book.rest.core]
[aero.core :refer (read-config)])
(:gen-class))
(def apps {:webserver book.rest.core/-main})
(defn -main [& argv]
(let [config (-> "config.edn" clojure.java.io/resource read-config)
target (-> argv first keyword)
target-fn (get apps target)]
(if target-fn
(apply target-fn [config])
(println "target" target "not found"))))