From a0778950b6975243444c034c3e85a8fb3485545e Mon Sep 17 00:00:00 2001 From: sahabaishakhi Date: Fri, 24 Jan 2020 01:11:31 +0530 Subject: [PATCH] hiccup page function html5 unresolved --- build.boot | 23 +++++++++++++++++------ src/demo/boot_build.clj | 26 +++++++++++++++++++++++++- 2 files changed, 42 insertions(+), 7 deletions(-) diff --git a/build.boot b/build.boot index fc3dfff..f98270a 100644 --- a/build.boot +++ b/build.boot @@ -1,10 +1,21 @@ (set-env! + :source-paths #{"src"} :resource-paths #{"src"} - :dependencies '[[me.raynes/conch "0.8.0"]]) - -(task-options! - pom {:project 'boot-clj-boilerplate - :version "0.1.0"} - jar {:manifest {"Foo" "bar"}}) + :project 'boot-clj-boilerplate + :version "0.1.0-SNAPSHOT" + :dependencies '[[org.clojure/clojure "1.10.0"] + [me.raynes/conch "0.8.0"] + [ring "1.7.1"] + [compojure "1.6.1"] + [http-kit "2.3.0"] + [hiccup "1.0.5"]]) (require '[demo.boot-build :refer :all]) + +(task-options! + pom {:project (get-env :project) + :version (get-env :version) + :license {"Eclipse Public License" + "http://www.eclipse.org/legal/epl-v10.html"}} + aot {:namespace `#{demo.boot-build}} + jar {:main `demo.boot-build}) diff --git a/src/demo/boot_build.clj b/src/demo/boot_build.clj index 57e2a6d..e55fc4a 100644 --- a/src/demo/boot_build.clj +++ b/src/demo/boot_build.clj @@ -1,6 +1,26 @@ (ns demo.boot-build (:require [boot.core :as core] - [boot.task.built-in :as task])) + [boot.task.built-in :as task] + [compojure.core :refer [defroutes GET]] + [hiccup.core :refer :all] + [hiccup.core :refer :all] + [org.httpkit.server :as server] + [compojure.route :as route] + [ring.middleware.reload :refer [wrap-reload]] + )) + +(defn homepage + [request] + (html5 [:head] + [:body + [:div "hello"]])) + +(defroutes app + (GET "/" [] homepage)) + +(defn -main [& args] + (server/run-server (wrap-reload #'app) {:port 8000}) + (println (str "Server is running on port 8000"))) (core/deftask build "Build my project." @@ -10,3 +30,7 @@ (core/deftask hello [] (println "hello")) + +;; (core/deftask run +;; [] +;; (-main))