Permalink
Browse files

Disabling server side rendering for load testing.

  • Loading branch information...
1 parent 5e02469 commit bb3339e899009f1a2e374560765b40ea004a86bc @pupeno pupeno committed with pupeno Sep 9, 2015
Showing with 6 additions and 6 deletions.
  1. +6 −6 src/clj/projectx/handler.clj
@@ -12,11 +12,11 @@
Invocable]))
(defn render-app [path]
- (let [js-engine (doto (.getEngineByName (ScriptEngineManager.) "nashorn")
- (.eval "var global = this") ; React requires either "window" or "global" to be defined.
- (.eval (-> "public/js/server-side.js" ; TODO: load the console polyfill, so that calling console.log is safe.
- io/resource
- io/reader)))
+ (let [js-engine nil #_(doto (.getEngineByName (ScriptEngineManager.) "nashorn")
+ (.eval "var global = this") ; React requires either "window" or "global" to be defined.
+ (.eval (-> "public/js/server-side.js" ; TODO: load the console polyfill, so that calling console.log is safe.
+ io/resource
+ io/reader)))
render-page (fn [path]
(.invokeMethod
^Invocable js-engine
@@ -31,7 +31,7 @@
:content "width=device-width, initial-scale=1"}]
(include-css (if (env :dev) "css/site.css" "css/site.min.css"))]
[:body
- [:div#app [:div (render-page path)]]
+ [:div#app #_[:div (render-page path)]]
(include-js "js/app.js")]])))
(defn- path [request]

0 comments on commit bb3339e

Please sign in to comment.