Raw Node.js HTTP Server

This page is served by a Node.js server using ONLY the built-in http module. No Express, no frameworks.

Server Time: Wed Feb 04 2026 06:14:36 GMT+0000 (Coordinated Universal Time)
This proves: The response is generated dynamically by Node.js, not a static file.

Your Request Information

Here's what the server sees from req object:

PropertyValueHow to Access
Your IP Address10.1.38.156req.headers['x-forwarded-for'] or req.connection.remoteAddress
Request MethodGETreq.method
Request URL/demoreq.url
User AgentMozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)req.headers['user-agent']
Accept-Languagenot sentreq.headers['accept-language']
Host Headercse135.site:3001req.headers['host']

Query String Parameters

Access via url.parse(req.url, true).query

No query parameters. Try adding ?name=YourName&course=CSE135 to the URL!

Try it:

All Request Headers

Access via req.headers object:

accept: */* user-agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com) accept-encoding: gzip, br, zstd, deflate host: cse135.site:3001 via: 1.1 squid-proxy-5b5d847c96-rvsrh (squid/6.13) x-forwarded-for: 10.1.38.156 cache-control: max-age=259200 connection: keep-alive

Custom Response Headers

Check your browser's Developer Tools (Network tab) to see these custom headers we set:

The Code Behind This

This server is approximately 200 lines of code. View the source: live-demo.js

Back to Module 02