   [config]
   (let [port (config :server-port)]
     (info "Server (development) on port" port "starting")
-    (run-jetty dev-application {:port port :join? false}))
+    (run-jetty (create-dev-application) {:port port :join? false}))
   )

  (route/not-found "<h1>not found</h1>")
  )

(def application
  (-> (handler/site main-routes)
      ))

(def dev-application
  (-> #'application
      (wrap-reload '(ruuvi-server.core))
      (wrap-stacktrace)))


  [config]
  (let [port (config :server-port)]
    (info "Server (production) on port" port "starting")  
    (run-jetty (create-application) {:port port :join? false}))
  )

(defn start-dev
