This is an experiment in rendering React JavaScript applications on the server, using go for the backend. It builds upon the otto JavaScript interpreter and my ottoext package to provide just enough of a JavaScript environment to support rendering a React application, provided that application uses very few browser APIs during its critical render path.
NOTE: Right now, this project relies on several unmerged patches to otto's
interpreter, which fix bugs involved in cloning VM instances and parsing certain
expressions, and add support for source maps. Please build the server
component with godep go build
until this is merged, or apply the following
otto PRs to your local copy of otto.
- #115 (
432b4361a78dd336691458dea33bda22ab158e7a
) Fixed TypeError message when evaluating a.b["c"] where a.b is undefined - #134 (
11907dfb901ea7521123bb6dc1ac7a31cc11115d
) add test for for cloning an object with a get/set property - #138 (
18c054f15ea76a2124dfbad05e0059e573241be1
) add sourcemap support - #139 (
33ac8bd28a37753ea1e8649cadd4196be6e55e06
) fix parsing of statements likenew a["b"]