From 93ebff2e13572e7110966b8a9b6320546e5e87bb Mon Sep 17 00:00:00 2001 From: bloombar Date: Wed, 8 Nov 2023 17:04:27 -0500 Subject: [PATCH] removing lodash --- README.md | 4 ++-- back-end/app.js | 1 - back-end/config/jwt-config.js | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5077060..2720976 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Copy the file named `.env.example` into a new file named simply, `.env`. Make sure the `REACT_APP_BACKEND` setting in this file specifies the correct domain and port where the Express back-end app is running. -```javascript +```js REACT_APP_BACKEND=http://localhost:3000 ``` @@ -80,7 +80,7 @@ Copy the file named `.env.example` into a new file named simply, `.env`. Make sure the `FRONT_END_DOMAIN` setting in this file specifies the correct domain and port where the React front-end app is running. -```javascript +```js FRONT_END_DOMAIN=http://localhost:3001 ``` diff --git a/back-end/app.js b/back-end/app.js index 3b09238..6015963 100644 --- a/back-end/app.js +++ b/back-end/app.js @@ -8,7 +8,6 @@ const cookieParser = require("cookie-parser") // middleware useful for parsing c require("dotenv").config({ silent: true }) // load environmental variables from a hidden file named .env // the following are used for authentication with JSON Web Tokens -const _ = require("lodash") // the lodash module has some convenience functions for arrays that we use to sift through our mock user data... you don't need this if using a real database with user info const jwt = require("jsonwebtoken") const passport = require("passport") diff --git a/back-end/config/jwt-config.js b/back-end/config/jwt-config.js index be3e227..c8cd5e4 100644 --- a/back-end/config/jwt-config.js +++ b/back-end/config/jwt-config.js @@ -15,7 +15,7 @@ let jwtOptions = { // define the method that is used by passport to verify the contents (i.e. the payload) of the JWT token const jwtVerifyToken = async function (jwt_payload, next) { - // console.log("JWT payload received", jwt_payload) // debugging + console.log("JWT payload received", jwt_payload) // debugging // check if the token has expired const expirationDate = new Date(jwt_payload.exp * 1000) // convert from seconds to milliseconds