The first thing we need to do is load in Moment. Currently, the only library we load in on the frontend is jQuery. We can do this a few different ways; I'm going to go ahead and actually grab a file out of the node_modules folder. We've installed Moment, version 2.15.1, and we can actually grab the file we need for the frontend, which is sitting inside the node_modules folder.
We're going to go into node_modules, we have a really long list of alphabetical folders, I'm looking for the one called moment. We're going to go into moment and grab moment.js. I'm going to right-click to copy it, then I'm going to scroll up to the very top, close node_modules, and I'm going to paste it right inside of our js | libs directory. We now have moment.js and if you open it, it's a really long library file. There's no need to make any changes to that file, all we have to do is load in index.js. Just next to our jQuery import, we're going to add a brand new script tag, we'll then provide that src attribute setting it equal to /js/js/moment.js, just like this:
<script src="/socket.io/socket.io.js"></script>
<script src="/js/libs/jquery-3.1.0.min.js"></script>
<script src="/js/libs/moment.js"></script>
<script src="/js/index.js"></script>
Now that we have this in place, we have access to all those Moment functions only on the client side, which means that over inside index.js we can properly format the timestamp that comes back inside the message. Now before we make any changes, let's go ahead and start up our server using the following command:
nodemon server/server.js
We can go ahead and move into the browser, going to localhost:3000 and giving it a refresh, and our app is working as expected. If I open up the Developer Tools, inside the Console tab we can actually use Moment. We have it accessible via moment just like we did over inside Node. I can use moment, calling format: moment().format().
We get back our string:

You should be able to make this call if you've successfully imported Moment. If you are seeing this, then you are ready to move on to the actual updating of index.js.