console.log(`${req.protocol}://${req.get('host')}/${req.originalUrl}`);
req.protocol - gives the protocol you used like HTTP
req.get(host) - give host name with port no like localhost:8080
req.protocol
- gives the protocol you used (e.g.HTTP
)req.get(host)
- gives the host name with the port number (e.g.localhost:8080
)