Skip to content
Permalink
Browse files

figwheel

  • Loading branch information...
pjagielski committed Sep 14, 2015
1 parent c15f3c5 commit 8649a5aa137ec15b40dfd8d47c514e5bfe8449ee
@@ -4,3 +4,5 @@
config.edn
.idea
*.iml
resources/public/js/
*.log
@@ -14,23 +14,32 @@
[ring/ring-json "0.3.1"]
[cheshire "5.1.1"]]
:plugins [[lein-environ "1.0.0"]
[lein-gen "0.2.2"]]
[lein-gen "0.2.2"]
[lein-figwheel "0.3.9"]]
:generators [[duct/generators "0.3.0"]]
:duct {:ns-prefix modern-clj-web}
:main ^:skip-aot modern-clj-web.main
:target-path "target/%s/"
:aliases {"gen" ["generate"]
"setup" ["do" ["generate" "locals"]]}
:profiles
{:dev [:project/dev :profiles/dev]
:test [:project/test :profiles/test]
:uberjar {:aot :all}
:profiles/dev {}
:profiles/test {}
:project/dev {:source-paths ["dev"]
:repl-options {:init-ns user}
:dependencies [[reloaded.repl "0.1.0"]
[org.clojure/tools.namespace "0.2.11"]
[kerodon "0.6.1"]]
:env {:port 3000}}
:project/test {}})
{:dev [:project/dev :profiles/dev]
:test [:project/test :profiles/test]
:uberjar {:aot :all}
:profiles/dev {}
:profiles/test {}
:project/dev {:source-paths ["dev"]
:repl-options {:init-ns user}
:dependencies [[reloaded.repl "0.1.0"]
[org.clojure/tools.namespace "0.2.11"]
[kerodon "0.6.1"]]
:env {:port 3000}}
:project/test {}}
:cljsbuild
{:builds [{:id "dev"
:source-paths ["src-cljs"]
:figwheel true
:compiler {:main "modern-clj-web.core"
:asset-path "js/out"
:output-to "resources/public/js/modern-clj-web.js"
:output-dir "resources/public/js/out"}}]})
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div id="main">
</div>
<script src="js/modern-clj-web.js" type="text/javascript"></script>
</body>
</html>
@@ -0,0 +1,5 @@
(ns ^:figwheel-always modern-clj-web.core)

(enable-console-print!)

(println "hello from clojurescript")
@@ -1,8 +1,9 @@
(ns modern-clj-web.endpoint.example
(:require [compojure.core :refer :all]
[clojure.java.io :as io]
[ring.util.response :refer [response]]))

(defn example-endpoint [config]
(routes
(GET "/hello" [] (response {:hello "world"}))
(GET "/" [] "Hello World")))
(GET "/" [] (io/resource "public/index.html"))))
@@ -5,7 +5,7 @@
[duct.middleware.not-found :refer [wrap-not-found]]
[meta-merge.core :refer [meta-merge]]
[ring.component.jetty :refer [jetty-server]]
[ring.middleware.defaults :refer [wrap-defaults api-defaults]]
[ring.middleware.defaults :refer [wrap-defaults site-defaults]]
[ring.middleware.json :refer [wrap-json-body wrap-json-response]]
[modern-clj-web.endpoint.example :refer [example-endpoint]]))

@@ -15,7 +15,7 @@
[wrap-json-response]
[wrap-defaults :defaults]]
:not-found "Resource Not Found"
:defaults (meta-merge api-defaults {})}})
:defaults (meta-merge site-defaults {})}})

(defn new-system [config]
(let [config (meta-merge base-config config)]

0 comments on commit 8649a5a

Please sign in to comment.
You can’t perform that action at this time.