Adding the form field in index.html

Down here just between socket.io and index.js we're going to add a new script tag to load in jQuery. We've got to specify that src attribute with the path to the file /js/libs, followed by a forward slash and the file name, jquery-3.3.1.min.js:

<script src="/socket.io/socket.io.js"></script><script src="/js/libs/jquery-3.3.1.min.js"></script><script src="/js/index.js"></script>

Now let's go ahead and set up our form tag; this is going to render our form fields to the browser. If you're not familiar with these tags that is perfectly fine, simply follow along and I'll explain as we go.

Get Advanced Node.js Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.