Getting started with Express and Socket.io

Share this video with your friends

Send Tweet

Note: If you want to understand and follow along with the logging service Mark uses, watch this lesson: NodeJS Logging using Winston and Papertrail

In this lesson we will get an Express Server up and running with Socket.io. We will build the Socket.io logic in a seperate file to demonstrate how the Socket.io instance can be used within other parts of the Express Application.

This lesson is short and sweet and lays the groundwork for the other lessons in this course.

If you get an error starting the server which indicates a Papertrail connection error then you have not updated the Papertrail host and port in the logger.js.

You can safely ignore this error if you do not wish to use Papertrail - else you can sign up to a free Papertrail account and add the correct host and port.