Search code examples
clojurescript

Using clojurescript for a website on the server side and client side


I am considering building a website using ClojureScript. Does it make sense to write ClojureScript on both the client side and the serverside, much like node.js?


Solution

  • It's possible, but there's absolutely no reason not to use Clojure itself on the server side, and you'll get better performance and much better library availability. Interfacing Clojurescript/Clojurescript is no easier than Clojure/Clojurescript.

    The only situation where I'd recommend this is where you're already fully committed to a server-side javascript infrastructure (e.g, node) and wanted to write Clojurescript instead of Javascript.