Last active
October 2, 2015 13:24
-
-
Save pjagielski/9031e83a7ef3a16d05d5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lein new duct clojure-web-app +example | |
lein repl | |
(go) | |
[ring/ring-json "0.3.1"] | |
[cheshire "5.1.1"] | |
[ring.middleware.json :refer [wrap-json-body wrap-json-response]] | |
[wrap-json-body {:keywords? true}] | |
[wrap-json-response] | |
[ring.util.response :refer [response]] | |
(GET "/hello" [] (response {:hello "world"})) | |
curl -v http://localhost:3000/hello | |
[lein-figwheel "0.3.9"] | |
:cljsbuild | |
{:builds [{:id "dev" | |
:source-paths ["src-cljs"] | |
:figwheel true | |
:compiler {:main "clojure-web-app.core" | |
:asset-path "js/out" | |
:output-to "resources/public/js/clojure-web-app.js" | |
:output-dir "resources/public/js/out"}}]} | |
<!DOCTYPE html> | |
<html> | |
<head> | |
</head> | |
<body> | |
<div id="main"> | |
</div> | |
<script src="js/clojure-web-app.js" type="text/javascript"></script> | |
</body> | |
</html> | |
(GET "/" [] (io/resource "public/index.html")) | |
(ns ^:figwheel-always clojure-web-app.core) | |
(enable-console-print!) | |
(println "hello from clojurescript") | |
rlwrap lein figwheel |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment