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

Activate servers in docs. #1031

Merged
merged 2 commits into from
Jan 6, 2019

Conversation

tolmasky
Copy link
Contributor

This pull request goes with koajs/koajs.com#38, to turn on the two examples.

Reviewed by @tolmasky.

@codecov
Copy link

codecov bot commented Jul 22, 2017

Codecov Report

Merging #1031 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #1031   +/-   ##
======================================
  Coverage     100%    100%           
======================================
  Files           5       5           
  Lines         393     393           
======================================
  Hits          393     393

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d9ef603...bc75cfd. Read the comment docs.

@jonathanong
Copy link
Member

anyone other than @tolmasky have an opinion on this?

Copy link
Contributor

@niftylettuce niftylettuce left a 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

@fl0w
Copy link
Contributor

fl0w commented Aug 1, 2018

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.

@tolmasky
Copy link
Contributor Author

tolmasky commented Aug 1, 2018

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:

screen shot 2018-08-01 at 8 33 49 am

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:

27849775-76c14778-6104-11e7-858d-47673dbc58b9

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.

@niftylettuce niftylettuce merged commit b25e79d into koajs:master Jan 6, 2019
@fl0w fl0w mentioned this pull request Jan 7, 2019
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

Successfully merging this pull request may close these issues.

4 participants