{"version":"1.0","type":"rich","title":"http-debugging-proxy.js","description":"This example demonstrates a custom HTTP proxy server that intercepts requests and serves local files or forwards traffic to a remote target. The code uses Node.js’s `http` module and the `http-proxy` library to create a server listening on port 5050. It checks the request URL for specific paths like `/package/http-proxy` or `/local.css` to stream local HTML or CSS files via `fs.createReadStream`. All other requests are proxied to `https://www.npmjs.org` using `proxy.web(req, res, { target })`, showing conditional routing and file serving alongside proxying.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-1f22f96b70d4c780840c?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}