    :gender (s/enum :male :female)
    :offspring s/Str
    :greek-equivalent s/Str})
-
-(defn fiboo
-  ([]
-   (let [fib [0 1 1]]
-     {:info "Fibonacci number" :fib-r fib :result (last fib)}))
-  ([n]
-   (let [fib [0 1]]
-     {:info "fibo after " n "steps " :fib-r fib :result (last fib)})))
 
 (defn mapify-gods
   [pdf]

      (GET "/time-lord" []
        :return String
        :summary "return local time"
        (ok (timelord)))
      (POST "/add-god" []
        :return String
        :body [gods god]
        (ok "I am a God"))))))


;;Middleware is a function that receives the request and response objects of an HTTP request/response cycle.
;;in other frameworks “middleware” is called “filters”
(defn wrap-log-request
  ""
  [handler]
  (fn [req]
    (let [resp (handler req)]
      resp)))

(defn app [] 
  (-> (create-routes)
      wrap-log-request
      wrap-json-response

      (wrap-cors :access-control-allow-origin [#"http://localhost:3000"]
                  :access-control-allow-methods [:get :put :post :delete])))

(defn -main []
  (run-server (app) {:port (:port @config)})
  (println "Server running at port:" (:port @config)))
