Skip to content

jelinden/go-isomorphic-react-v8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React.js server and client side rendering with Go

This experiment is based on selfjs and w8worker, a Javascript interpreter for Go. The goal for the experiment was to explore if reactjs server side rendering could be done with Go and to use the same code in the browser.

As a http server echo is used.

In rss.go we are fetching a rss feed (scheduled in main.go). Scheduling also renders the results and saves them in a global variable to be used later.

You can test it here: isomorphic2.uutispuro.fi

To run:

go build && ./go-isomorphic-react-v8

To benchmark serverside rendering:

go test -bench=.

The result on my MacBook Air (1.4 GHz i5):

PASS
BenchmarkRender1               1        277493982 ns/op
ok      github.com/jelinden/go-isomorphic-react-v8 2.747s

About

Use GO and V8 to server side render React

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published