Encontre meu URL em Nodejs


const url =req.protocol + '://' + req.headers.host + req.originalUrl;

console.log(url) //http://localhost:3000/products

or
const url =req.protocol + '://' + req.headers.host + req.baseUrl;

console.log(url) //http://localhost:3000/products
Nazmul Hasan