 ;;;
 ;;;   Clouseau
 ;;; 
-;;;    Copyright (C) 2015 Pavel Tisnovsky <ptisnovs@redhat.com>
+;;;    Copyright (C) 2015, 2016  Pavel Tisnovsky <ptisnovs@redhat.com>
 ;;; 
 ;;; Clouseau is free software; you can redistribute it and/or modify
 ;;; it under the terms of the GNU General Public License as published by

(def cli-options
    "Definitions of all command line options currenty supported."
    ;; an option with a required argument
    [["-p" "--port   PORT"    "port number"   :id :port]])

(def app
    "Definition of a Ring-based application behaviour."

        default-port
        (get-and-check-port specified-port)))

(defn show-help
    "Display brief help on the standard output."
    [all-options]
    (println "Usage:")
    (println (:summary all-options)))

(defn -main
    "Entry point to the Clouseau server."
    [& args]
    (let [all-options      (cli/parse-opts args cli-options)
          options          (all-options :options)
          port             (options :port)]
          (if (:help options)
              (show-help all-options)
              (start-server (get-port port)))))

; finito

