File tree 4 files changed +18
-7
lines changed
4 files changed +18
-7
lines changed Original file line number Diff line number Diff line change 9
9
.lein-deps-sum
10
10
.lein-failures
11
11
.lein-plugins
12
- .lein-env
13
12
.lein-repl-history
14
13
.env
15
14
resources /public /js /app.js *
Original file line number Diff line number Diff line change
1
+ ;; For dev use
2
+ {
3
+ :datomic-uri "datomic:free://localhost:4334/cljsfiddle"
4
+
5
+ ;; Registered for localhost:8080
6
+ :github-client-id "d220094711eae05f92ee"
7
+ :github-client-secret "9514e83d9157e01b3962c162d6e50c0ad3a9b00d"
8
+
9
+ ;; 16 random characters
10
+ :session-secret "1234567891234567"
11
+ }
Original file line number Diff line number Diff line change 7
7
```
8
8
$ git clone https://github.com/jonase/cljsfiddle
9
9
$ cd cljsfiddle
10
- $ export DATOMIC_URI=datomic:free://localhost:4334/cljsfiddle
11
- $ # Note. registered for localhost:8080
12
- $ export GITHUB_CLIENT_ID=d220094711eae05f92ee
13
- $ export GITHUB_CLIENT_SECRET=9514e83d9157e01b3962c162d6e50c0ad3a9b00d
14
- $ # Note. e.x. SESSION_SECRET=1234567891234567
15
- $ export SESSION_SECRET=[16 random characters]
16
10
$ wget https://my.datomic.com/downloads/free/0.9.4815
17
11
$ unzip 0.9.4815
18
12
```
Original file line number Diff line number Diff line change 29
29
(assert (env :github-client-id ) " GITHUB_CLIENT_ID environment variable not set" )
30
30
(assert (env :github-client-secret " GITHUB_CLIENT_SECRET environment variable not set" ))
31
31
32
+ (defn ensure-jscache-dir []
33
+ (let [p (str " resources/jscache/" (:cljsfiddle-version env) " /" )
34
+ f (java.io.File. p)]
35
+ (when (.mkdirs f)
36
+ (println " Created" p))))
37
+
32
38
(defn edn-response [edn-data]
33
39
{:status 200
34
40
:headers {" Content-Type" " application/edn" }
192
198
(def app (get-handler ))
193
199
194
200
(defn -main []
201
+ (ensure-jscache-dir )
195
202
(let [port (Integer/parseInt (or (env " PORT" ) " 8080" ))]
196
203
(jetty/run-jetty (-> app
197
204
wrap-stacktrace)
You can’t perform that action at this time.
0 commit comments