diff --git a/config/sys.edn b/config/sys.edn index 966c159f..f1583970 100644 --- a/config/sys.edn +++ b/config/sys.edn @@ -1,6 +1,6 @@ {:env :dev ;; can be either :dev or :prod :systems {:prod {:http-port 8123 - ;; note the initial `/` because prod system is run in a container + ;; note the initial `/` because prod-system is run in a container :db-uri "/datalevin/prod/flybotdb" :oauth2-callback "https://flybot.sg/oauth/google/callback"} :dev {:http-port 8123 @@ -8,7 +8,9 @@ :oauth2-callback "http://localhost:8123/oauth/google/callback"} :figwheel {:db-uri "datalevin/figwheel/db" :oauth2-callback "http://localhost:9500/oauth/google/callback" - ;; "flybot-app://" for mobile, default to "/" for web + ;; where the user is redirected after oatuh2: + ;; "flybot-app://" for mobile + ;; default to "/" for web :client-root-path "/"} :test {:http-port 8100 :db-uri "datalevin/test/db"}} diff --git a/server/src/flybot/server/systems.clj b/server/src/flybot/server/systems.clj index 78e7d748..b50b26b7 100644 --- a/server/src/flybot/server/systems.clj +++ b/server/src/flybot/server/systems.clj @@ -76,11 +76,10 @@ Figwheel just needs a handler and starts its own server hence we dissoc the http-server. If some changes are made in one of the backend component (such as handler for instance), you can halt!, reload ns and touch again the system." - (when (= :dev ENV) - (-> (config/system-config :figwheel) - system - (assoc :db-conn (db-conn-system id/init-data)) - (dissoc :http-port :http-server)))) + (-> (config/system-config :figwheel) + system + (assoc :db-conn (db-conn-system id/init-data)) + (dissoc :http-port :http-server))) (def figwheel-handler "Provided to figwheel-main.edn. @@ -102,9 +101,8 @@ "The dev system starts a server on port 8123. It loads some real data sample. The data is deleted when the system halt!. It is convenient if you want to see your backend changes in action in the UI." - (when (= :dev ENV) - (-> (system (config/system-config :dev)) - (assoc :db-conn (db-conn-system id/init-data))))) + (-> (system (config/system-config :dev)) + (assoc :db-conn (db-conn-system id/init-data)))) (comment (touch dev-system) @@ -118,9 +116,8 @@ "The prod system starts a server on port 8123. It does not load any init-data on touch and it does not delete any data on halt!. You can use it in your local environment as well." - (when (= :prod ENV) - (let [prod-cfg (config/system-config :prod)] - (system prod-cfg)))) + (let [prod-cfg (config/system-config :prod)] + (system prod-cfg))) (comment (touch prod-system)