Ejemplo 1: obtención rápida de cookies
const cookieParser = require('cookie-parser');
const express = require('express');
const app = express();
app.use(cookieParser());
app.get("https://foroayuda.es/", (req, res) => {
console.log('Cookies: ', req.cookies);
console.log('Signed Cookies: ', req.signedCookies);
});
app.listen(3000);
Ejemplo 2: cookies express
const express = require('express');
const cookieParser = require('cookie-parser');
const app = express();
app.use(cookieParser());
app.get("https://foroayuda.es/", (req, res) => {
res.send(req.cookies);
});
app.listen(3000);
¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)