0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-01 02:06:53 -05:00
penpot/backend/src/app/main.clj

43 lines
1 KiB
Clojure
Raw Normal View History

;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; This Source Code Form is "Incompatible With Secondary Licenses", as
;; defined by the Mozilla Public License, v. 2.0.
;;
2020-05-26 12:28:35 +02:00
;; Copyright (c) 2020 UXBOX Labs SL
(ns app.main
(:require
2020-12-04 16:01:33 +01:00
[app.config :as cfg]
[clojure.tools.logging :as log]
[mount.core :as mount]))
(defn- enable-asserts
[_]
(let [m (System/getProperty "app.enable-asserts")]
(or (nil? m) (= "true" m))))
;; Set value for all new threads bindings.
(alter-var-root #'*assert* enable-asserts)
;; Set value for current thread binding.
(set! *assert* (enable-asserts nil))
;; --- Entry point
(defn run
[_params]
2020-12-04 16:01:33 +01:00
(require 'app.srepl.server
2020-12-09 16:48:26 +01:00
'app.services
'app.migrations
'app.worker
'app.media
'app.http)
2020-12-04 16:01:33 +01:00
(mount/start)
(log/infof "Welcome to penpot! Version: '%s'." (:full @cfg/version)))
(defn -main
[& _args]
(run {}))