(ns five-three-one.server
  (:require [five-three-one.handler :refer [app]]
            [environ.core :refer [env]]
            [ring.adapter.jetty :refer [run-jetty]]
            [five-three-one.model.migration :refer [migrate]])
  (:gen-class))

(defn -main [& args]
  (let [port (Integer/parseInt (or (env :port) "3000"))]
    (migrate)
    (run-jetty app {:port port :join? false})))

(ns five-three-one.server
  (:require [five-three-one.handler :refer [app]]
            [environ.core :refer [env]]
            [ring.adapter.jetty :refer [run-jetty]]
            [five-three-one.model.migration :refer [migrate]])
  (:gen-class))

(defn -main [& args]
  (if (some #{"migrate"} args)
    (migrate)
    (let [port (Integer/parseInt (or (env :port) "3000"))]
      (run-jetty app {:port port :join? false}))))

Enable "lein run migrate" command for db migration
Enable "lein run migrate" command for db migration

the-clojure-duo/five-three-one,ProjectFrank/five-three-one,the-clojure-duo/five-three-one,ProjectFrank/five-three-one