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

[Question] How to use nodebox-runtime in browser without any online resource's support #34

Closed
lifubang opened this issue Apr 4, 2023 · 7 comments

Comments

@lifubang
Copy link

lifubang commented Apr 4, 2023

Hello, I have following codesandbox projects for many years. Thank you for let these excellent codes open source.
When I test nodebox-runtime in local machine accoding to https://sandpack.codesandbox.io/docs/advanced-usage/nodebox. I found that we need to load some runtime support resouces from https://nodebox-runtime.codesandbox.io and https://rm127lp-3000.nodebox.codesandbox.io.
My question is that how to use nodebox-runtime without any online resource's support? Because users in my area can't load these resouces without VPN.
I think it will be better if we have a pure node js runtime in browser. We can run it without load any other online resources when in running period.
Thanks.

@DeMoorJasper
Copy link
Collaborator

Everything is just static files, but it needs to live somewhere, you can host it on-prem if you want, if you want an entirely offline solution there is only one solution which is native software like Node, Deno, Bun, ...

If you want an on-premise setup you will need to reach out because we aren't allowed to publish the code of the runtime publicly. Reach out for that at [email protected]

@lifubang
Copy link
Author

lifubang commented Apr 4, 2023

Thank you for your reply. Do you know whether there are some other pure nodejs runtimes implemented in the browser or not?
For example, we can use it likes this?

<script type="text/javascript" src="anodejsruntimeinbrowser.js"></script>
<script type="text/javascript">
var nodescript = `const buf = Buffer.from('hello');
console.log(buf.toString());
`;
anodejsruntimeinbrowser.run(nodescript);
// we will get 'hello' here.
</script>

We only need to load this one js anodejsruntimeinbrowser.js from cdn.

@DeMoorJasper
Copy link
Collaborator

DeMoorJasper commented Apr 4, 2023

This is kind of how nodebox works already? The cdn is just our endpoints by default, unless you want something that isn't sandboxed to a new domain/iframe that does not exist afaik (you can probably build a minimal version using browserify modules)

@lifubang
Copy link
Author

lifubang commented Apr 6, 2023

This is kind of how nodebox works already?

I think it may be no. Besides installing @codesandbox/nodebox, we have to connect to https://nodebox-runtime.codesandbox.io when running nodejs scripts in browser.
So, I think there is no fully open source projects in this area(running nodejs/webpack in browser). All the open source projects are all about how to use it(looks like SDK), not about how to implement it?

This is just a discussion, I advise the leader in this area should became the fully open source in this area, like kubernetes, docker, mongodb or redis. I think it will help you gain more users, and it will help to establish a healthy community ecological environment in this area.

@danilowoz
Copy link
Collaborator

Unfortunately, we did not fully open-source Nodebox for a variety of reasons, some of which are outside of our control. We believe this technology may be the future of improved DX. So, we will continue to explore whether we can open-source it in the future.

Also we are also not allowed to disclose those reasons, but please understand that we are deeply frustrated by the fact that we cannot open source right now. Generally, it's a frustrating situation to be in, both for us and others, because we cannot disclose why. We are exploring whether we can still open-source this in the future, though. And if that happens, we can post an update here.

@jesstelford
Copy link

jesstelford commented Mar 12, 2024

@danilowoz Just checking in a year later; have you been able to fully open source Nodebox? Would love to give it a go, but the proprietary nature scares our corporate security team :(

@brianjenkins94
Copy link

I would even settle for unobfuscated source code so I can fix these issues.

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

5 participants