Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

Workshop

This workshop contains quiz questions and exercises to help cement your learning in this hour.

Quiz

1. Do you have to use Express to use Socket.IO?

2. What happens to the list of nicknames if the server process is killed or dies?

3. Can you host your Socket.IO server and web application server in different places?

Quiz Answers

1. No. Socket.IO is independent from Express. Furthermore, Socket.IO abstracts WebSockets for you, so if you want to, you can write your own WebSockets server and handle the client-side code.

2. The list of nicknames is only persisted in memory in the examples in this hour, so if the process is killed or dies, the list of nicknames will be lost. You could use a key value store like Redis to hold this list if you wanted.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial