You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
There is strong interest to bring a "try it in your browser" feature to the new website. We need to evaluate and choose a technical strategy to pull this off.
Deliverable from this ticket should be a fleshed out tech proposal for a node playground on nodejs.org.
Options already discussed (in order of my personal opinions on feasibility 😉):
Use an existing "runnable snippets" service (Ex: Glot.io is open source and provides an API)
Run it all in-browser (Ex: by bundling browserify native package shims for dummy behavior)
Run our own container to execute simple programs (would like to avoid)
Code dummy REPLs to only run the commends requires for specific examples.
1) Use Existing Service
Pros:
Security and maintenance is someone else's issue
Should work out of the box
Actually runs real code. No unexpected behavior.
Cons:
We become dependent on an external service (risk may be mitigated by using an open source solution)
Potential added complexity to the website.
Cost? Not sure what pricing models look like here.
2) In-Browser Solution
Pros:
Static! Build it once and forget it. No network, hosting, or 3rd pary required.
Runs "real"-ish code. Will do well enough for limited demos.
Bragging rights. Really shows off that Node is just JavasScript.
Cons:
Potential security risks?
Potential unexpected behavior from in-browser shims.
We will have to maintain it.
Will bloat page size (Fix: lazy loading?..)
3) Run our own container service
Pros:
We control it.
Actually runs real code. No unexpected behavior.
Cons:
SECURITY.
Time and maintenance cost.
We really shouldn't pick this option.
4) Dummy REPL
Pros:
Potentially simplest solution.
Doesn't actually run code, no security risk.
Cons:
Doesn't actually allow you to write / run code like you would want. I question if this is the ideal UX.
Dummy REPL may be too complex to actually handle all cases we'd want from interactive demos.
Branching this conversation off from #9.
There is strong interest to bring a "try it in your browser" feature to the new website. We need to evaluate and choose a technical strategy to pull this off.
Deliverable from this ticket should be a fleshed out tech proposal for a node playground on
nodejs.org.Options already discussed (in order of my personal opinions on feasibility 😉):
1) Use Existing Service
Pros:
Cons:
2) In-Browser Solution
Pros:
Cons:
3) Run our own container service
Pros:
Cons:
4) Dummy REPL
Pros:
Cons: