瀏覽代碼

logging boot main function

bs-boot-httpkit-compojure-implementation
sahabaishakhi 5 年之前
父節點
當前提交
d7c3e7d60c
共有 2 個檔案被更改,包括 9 行新增7 行删除
  1. +3
    -3
      build.boot
  2. +6
    -4
      src/demo/boot_build.clj

+ 3
- 3
build.boot 查看文件

@@ -13,9 +13,9 @@
(require '[demo.boot-build :refer :all]) (require '[demo.boot-build :refer :all])


(task-options! (task-options!
pom {:project (get-env :project)
:version (get-env :version)
pom {:project 'boot-clj-boilerplate
:version "0.1.0-SNAPSHOT"
:license {"Eclipse Public License" :license {"Eclipse Public License"
"http://www.eclipse.org/legal/epl-v10.html"}} "http://www.eclipse.org/legal/epl-v10.html"}}
aot {:namespace `#{demo.boot-build}}
aot {:all true}
jar {:main `demo.boot-build}) jar {:main `demo.boot-build})

+ 6
- 4
src/demo/boot_build.clj 查看文件

@@ -1,9 +1,10 @@
(ns demo.boot-build (ns demo.boot-build
(:require [boot.core :as core] (:require [boot.core :as core]
[boot.task.built-in :as task] [boot.task.built-in :as task]
[boot.cli :as cli]
[compojure.core :refer [defroutes GET]] [compojure.core :refer [defroutes GET]]
[hiccup.core :refer :all] [hiccup.core :refer :all]
[hiccup.core :refer :all]
[hiccup.page :refer :all]
[org.httpkit.server :as server] [org.httpkit.server :as server]
[compojure.route :as route] [compojure.route :as route]
[ring.middleware.reload :refer [wrap-reload]] [ring.middleware.reload :refer [wrap-reload]]
@@ -20,6 +21,7 @@


(defn -main [& args] (defn -main [& args]
(server/run-server (wrap-reload #'app) {:port 8000}) (server/run-server (wrap-reload #'app) {:port 8000})
(println app)
(println (str "Server is running on port 8000"))) (println (str "Server is running on port 8000")))


(core/deftask build (core/deftask build
@@ -31,6 +33,6 @@
[] []
(println "hello")) (println "hello"))


;; (core/deftask run
;; []
;; (-main))
(core/deftask run
[]
(-main))

Loading…
取消
儲存