Our great sponsors
-
go-react-ssr
Build full-stack web apps with Go & React. End to end type-safety and lightning fast ⚡️
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
quickjs
Go bindings to QuickJS: a fast, small, and embeddable ES2020 JavaScript interpreter. (by elsaland)
Go SSR POC GitHub Repository
Go React SSR GitHub Repository
I added polyfills for the Web APIs used in the React code.
Firstly, I used rogchap/v8go to execute JavaScript in a Go environment. I listed other options below.
dop251/goja
robertkrimen/otto
quickjs-go/quickjs-go
elsaland/quickjs
Use esbuild to build the React code into a form executable on both the server and client sides.
Related posts
- Choosing scripting extension - need advice
- Suggest me a service where I can **easily** upload huge files with api and getting them by links or api?
- Using Javascript plugins in Go
- v8go: JavaScript in Go - v0.5.0 released 🎉 Global Objects, Function Templates, Go callbacks and loads more!
- Goja: ECMAScript/JavaScript engine in pure Go