-
Notifications
You must be signed in to change notification settings - Fork 53
Tech Exploration for In-Browser Node Playground #12
Comments
Hi! I'm Jenn Schiffer, the community engineer on Glitch.com, and I wanted to throw our "existing service" into the ring here and answer to the thoughtful cons you listed. Glitch is an app community that includes an in-browser collaborative editor for free and deploys apps as the code is edited. We support Node primarily and allow users to show their entire app's source - not just client-side files, making it a great option for sandboxing in documentation. Glitch apps and their source can be nicely embedded into web pages (our URLs are also supported by oembed), so we'd anticipate very little, if any, complexity being added to the site setting it up. And we don't lock people into the service (we provide a console along with buttons to import/export from/to github and download a gzip folder of the app). The apps are run based off of normal scripts in the package.json file - if it runs on Glitch it can run on any Node server. An additional "pro" of using Glitch is that being connected into a community with an existing network of contributors means your examples can be improved and updated by people who may not have even gone to the Nodejs.org. Node is a huge part of our mission, tech stack, and how our community builds the open Web, and we would love to further help the project - I think this would be a great opportunity to do that. We’re also willing to commit in writing to providing the service at no cost as our way of supporting the Node community we’re part of, so the Foundation won’t be taking on any risk there. If you have any questions I'll be happy to answer them whenever/wherever! |
This is a useful thing to want from any chosen solution. (I think) this could make it easier for anyone updating examples in future and doing long-term maintenance. They would not need to update the source code on the service, then go to update our documentation in our own repo, potentially letting documentation get out of date. Editing the source + documentation could be done in one place. |
There is additional context around the RunKit option: |
Hi everyone, the RunKit team shared a few demos at the meeting today of how RunKit could be used both for the Getting Started page as well as actual API documentation. I'm providing these demos here for anyone else who wants to take a look, as well as the github repo it's being hosted at (we might be continuing to update these demos as its serving as a greattest bed for some of our new unshipped features). Site: http://nodejs-org-runkit-demo.com/ The API documentation demo linked in that page is currently just being generated from more or less the unchanged markdown files used to generate the current docs, we've simply re-arranged the flow but haven't spent any time "rethinking" the examples themselves for this sort of "try-first" model, and I think there could be a lot of great opportunities there. The main idea behind the Getting Started prototype is to have many different kinds of "Getting Starteds" for the many different uses of Node -- people who want to make a microservice vs a terminal app would be best served with different tutorials. We've only really fleshed out the first two sections (as we've been making them fairly custom), but I think it does a good job of conveying the idea. Thanks! |
Thank you @tolmasky for the amazing demos today! They certainly helped us wrap our head around what RunKit is capable of providing for this project. For API snippets and single-file tutorials I think RunKit provides amazing utility. I'd love to also see, as you mentioned in the meeting, how we can set up a milti-file snippet for some potentially more complicated and module-focused examples. I think we'll have to see how many of these complicated demos we will actually have after we work out the exact content for our "getting started" and "advanced tutorials" tracks, but I can't imagine a situation where we don't have at least a few – modules are such a central concept in Node.js |
Since this feature is mainly targeted at people new to Node, I think it would make sense for a good first impression to provide them with some sort of syntax highlighting, error squiggles, auto-completion and IntelliSense just like you would get in your code editor (for example, by using an editor like Microsoft/monaco-editor). |
I've unarchived this repo so I can close all PRs and issues before re-archiving. |
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:
The text was updated successfully, but these errors were encountered: