Simple Common Gateway Interface client for node.js.
This is basically a rewritten and updated version of claudioc's node-scgi, which I created so I could run firefox-sync behind a node proxy.
var SCGIClient = require('scgi-client');
var http = require('http');
http.createServer(SCGIClient(8085)).listen(80)
SCGIClient(port, [host], [opts])(request, response)
SCGIClient(path, [opts])(request, response)
opts = {
mountPoint: '', // when you have http://abc.def.com/blahscript/ and want blahscript to be your scgi path
serverName: 'unknown', // ip/hostname of your server, passed to the scgi server
serverPort: 80, // port of your server, passed to the scgi server
documentRoot: '' } // directory your webserver is serving documents from, passed to scgi server
npm install scgi-client
AUTH_TYPE and REMOTE_USER headers are not sent, because they seem to break firefox-sync. I've also not implemented them with digest auth.