I don't know how to access cookies at serverside so, I don't have tried anything yet
is there any method or any NPM package which will help to set or get cookies at server side?
I don't know how to access cookies at serverside so, I don't have tried anything yet
is there any method or any NPM package which will help to set or get cookies at server side?
You can use this package to manage cookies https://www.npmjs.com/package/cookies.
Here is a minimal example
var http = require('http')
var Cookies = require('cookies')
// Create a cookies object
var cookies = new Cookies(req, res, { keys: keys });
// Set the cookie to a value
cookies.set('LastVisit', new Date().toISOString(), { signed: true })
Trigger an event from server to the client. The client will retrieve the cookie data and POST it back to the server. Vice-Versa for setting the cookie.