-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Activate servers in docs. #1031
Activate servers in docs. #1031
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1031 +/- ##
======================================
Coverage 100% 100%
======================================
Files 5 5
Lines 393 393
======================================
Hits 393 393 Continue to review full report at Codecov.
|
anyone other than @tolmasky have an opinion on this? |
1a143c4
to
6c85b52
Compare
6c85b52
to
5ecc1fe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
I wouldn't mind these if the examples actually did a curl request or something to present output (without convoluting the example). As it is today, there's no benefit to being able to run these IMO. |
HI @fl0w -- not sure if you've had a chance to try the live examples yet (they're actually running on the site currently), but you can actually see a fair amount of output in this current version. When you click the link to the running site, the page itself opens in another tab, and the server's output shows up on the current page. So for example, in the second snippet, the user can actually inspect the logs placed in the various handlers: The main idea here is that, especially for someone that is fairly new to these technologies, the friction from reading about a framework and to actually trying it is quite high -- installing node if they're coming from another language, npm installing the package itself, etc. In my experience the difference between thinking you understand something and hitting a wall hours later when you actually try it, vs being able to poke at something immediately is huge. With the running examples on the site, the user is allowed to immediately experiment with the async/await nature and start getting a feel for the framework without having to do any significant context switch: Anyways, perhaps you were already fully aware of the functionality as it stands, in which case I apologize if any of this was redundant, but wanted to share some of the base ideas. |
This pull request goes with koajs/koajs.com#38, to turn on the two examples.
Reviewed by @tolmasky.