Create a middleware in the util folder called authMiddleware using jsonwebtokens. Get the token from the authorization headers and verify it against the secret key. If the token is not valid return a 401. If the token is valid call next() to move onto the next middleware.