lets-chat
lets-chat copied to clipboard
Update and rename chatMessage.js to optimized chatMessage.js
To use the input validation and pagination features, you will need to install the express-validator package and add the relevant middleware to your routes. You can do this by adding the following lines at the top of your file:
const { check, validationResult } = require("express-validator");
app.post( "/messages", [ check("sender").isString(), check("recipient").isString(), check("content").isString(), check("chat