Javascript function chains and events?

Delving into NodeJS, I came across (fab) that really impressed me. After watching the presentation by Jed, I understand how the function chain works, but I have one question: in case of a situation where the event can (but not necessarily), for example, in the case of an HTTP listener, how does the function chain work?

For example, if I had the following template:

(listen, 8080)
    (write)
        ('test1')
        ('test2')
    ()
()

How can I write a listening function so that in case of an HTTP request it writes the lines test1 'and' test2 'to the client?

+3
source share
2 answers

javascript . https://github.com/tatumizer/mesh. , . README .

+3

, (fab), - , , promises . . "" , " " . . promises .

0

Source: https://habr.com/ru/post/1793879/


All Articles