タグ

関連タグで絞り込む (2)

タグの絞り込みを解除

serverとnode.jsに関するIanLewisのブックマーク (1)

  • A HTTP Proxy Server in 20 Lines of node.js Code

    This is just amazing. In 20 lines of node.js code and 10 minutes of time I was able to write a HTTP proxy. Take a look: var http = require('http'); http.createServer(function(request, response) { var proxy = http.createClient(80, request.headers['host']) var proxy_request = proxy.request(request.method, request.url, request.headers); proxy_request.addListener('response', function (proxy_response)

    A HTTP Proxy Server in 20 Lines of node.js Code
    IanLewis
    IanLewis 2010/06/06
    This is just amazing. In 20 lines of node.js code and 10 minutes of time I was able to write a HTTP proxy. And it scales well, too. It's not a blocking HTTP proxy, it's event driven and asynchronous, meaning hundreds of people can use simultaneously and it will work well.
  • 1