Adding jQuery to update the DOM

Over inside server.js step one to that process is going to be to import the class that we've been working so hard to create. I'm going to go ahead and get this done, just below where we load in isRealString.

We can make a constant and I'm going to go ahead and pull off the users property, which is the one we export at the bottom of users.js, and we can import that using require. I'm going to require the local file ./. It's in the utils folder and this one is called users:

const {Users} = require('./utils/users');

Now that we have Users in place we can make a new instance of it. This is going to be the users instance. We need a way to run these methods, so right below our io variable, we can make a new variable ...

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.