~/talk

From Promises through Generators to async/await in node.js

TalkinGermanat Oredev 2017 · 2017-11-08..11-10· [nodejs, javascript]
speakerdeck:banj
slides:none on file

An end-to-end code demonstration converting a Node.js HTTP handler through four styles: callbacks, ES6 Promises, generator-based (co-style), and ES7 async/await. It shows the specific shim/wrapper used, which Node APIs are invoked, live code and tests, plus a simple benchmark comparing throughput and lines of boilerplate (async/await yields similar throughput, less nesting, ~30% fewer boilerplate lines), with all versions passing the same integration tests.

AI-written summary · about

  1. 0:00Async patterns in Node.js
  2. 3:02JavaScript promises basics
  3. 7:25Promises to generators
  4. 10:00Generators and async/await
  5. 13:19Async/await simplifies promises
  6. 16:03Async/await use cases
  7. 19:10Callbacks vs promises vs async/await
  8. 21:11Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.