I had a somewhat rough time getting nashorn to work with optimatizations none, but it does work!
Here's a snippet from a nashorn server rendering component I've been meaning to wrap up and document. I've been using variations inside a variety of projects for a while now. It plays very nicely with stuart sierra's component. One caveat. The nashorn engine takes a while to warm up and optimize code. this means you should call the renderer a few times on server spin up before accepting requests... https://gist.github.com/pleasetrythisathome/30c2cec625c9fcd81163 On Tuesday, November 25, 2014 10:22:59 AM UTC-5, Max Gonzih wrote: > I'm trying now to do it in noshorn, for now I'm stuck with stubbing > things and moving lot of logic inside components creation logic. > > On 11/25/2014 03:45 PM, David Nolen wrote: > > I've heard people use Node.js to server side render React. > > > > On Tue, Nov 25, 2014 at 4:22 AM, Max Gonzih <[email protected]> wrote: > >> Hi everyone. > >> > >> How can I render reagent components on server side? > >> I saw examples with jjs (nashorn) but problem is that my backend stack is > >> mostly Ruby. Of course JRuby is possible, but are there any other ways of > >> doing that? > >> I looked at PhantomJS but got stuck with goog.require calls that are > >> trying to use document.createElement('script') to load dependencies. > >> > >> Any advice is welcome, thank you! > >> > >> -- > >> Note that posts from new members are moderated - please be patient with > >> your first post. > >> --- > >> You received this message because you are subscribed to the Google Groups > >> "ClojureScript" group. > >> To unsubscribe from this group and stop receiving emails from it, send an > >> email to [email protected]. > >> To post to this group, send email to [email protected]. > >> Visit this group at http://groups.google.com/group/clojurescript. -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript.
