We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is your feature request related to a problem? Please describe. Add the ability to get the IP address from the request.
Describe the solution you'd like
const http = require('http'); const server = http.createServer((req, res) => { // Get connection details const { remoteAddress, remotePort, localAddress, localPort } = req.connection; console.log('Remote Address:', remoteAddress); console.log('Remote Port:', remotePort); console.log('Local Address:', localAddress); console.log('Local Port:', localPort); // Send a response res.writeHead(200, { 'Content-Type': 'text/plain' }); res.end('Hello World!\n'); }); const PORT = 3000; server.listen(PORT, () => { console.log(`Server is running on http://localhost:${PORT}`); });
Describe alternatives you've considered N/A
Additional context Add support to Metadapter-Events and SherpaJS Event module to support this (and Carrot's backend).
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is your feature request related to a problem? Please describe.
Add the ability to get the IP address from the request.
Describe the solution you'd like
Describe alternatives you've considered
N/A
Additional context
Add support to Metadapter-Events and SherpaJS Event module to support this (and Carrot's backend).
The text was updated successfully, but these errors were encountered: