Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple context managed by a load balancing technique #410

Open
anzalabidi opened this issue Aug 6, 2024 · 0 comments
Open

Multiple context managed by a load balancing technique #410

anzalabidi opened this issue Aug 6, 2024 · 0 comments

Comments

@anzalabidi
Copy link

iso := v8.NewIsolate()
	defer iso.Dispose()
	if iso == nil {
		log.Fatal("Failed to create V8 isolate")
	}
	v8Ctx := v8.NewContext(iso)
	defer v8Ctx.Close()

	_, err = v8Ctx.RunScript(backendBundle, "bundle.js")
	if err != nil {
		log.Fatalf("Failed to evaluate bundled script: %v", err)
	}
	val, err := v8Ctx.RunScript(fmt.Sprintf("renderApp(%s)", string(propsJSON)), "render.js")
	if err != nil {
		log.Fatalf("Failed to render React component: %v", err)
	}

Need to make this usable via context pool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant