Bringing in jQuery

jQuery is almost ubiquitous when it comes to JavaScript libraries, and we will use it in our application too. To add jQuery to our application, let's download the latest release from and save it to public/javascript/jquery.min.js. Then, we add the script in layout.jade to pull in jQuery to our application's pages:

    script(type='text/javascript', src='/javascripts/jquery.min.js')

Get Socket.IO Real-time Web Application Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.