Before jumping into the Local Strategy, let's learn a little bit about how we can make our Vue.js components to be served statically. Since we are using a separate frontend and backend, it can be a daunting task to keep maintaining these two versions, and especially while deploying the app, it can take a lot longer to configure everything. So, to manage our app better, we will build the Vue.js app, which will be a production build, and use the Node.js server only to serve the files. For that, we will be using a separate package called serve-static. So, let's go ahead and install the package:
$ npm install serve-static --save
Now, let's add the following contents to our server.js file:
const express = require('express');
const bodyParser = require('body-parser');
const mongoose = require('mongoose&apos...