How to set a cookie in Node.js using the Express framework?
I’m building a web application with Node.js and Express, and I need to set a cookie on the client’s browser. I’ve heard about using the res.cookie method, but I’m unsure how to implement it correctly or configure options like expiration. Can someone guide me through the process?