node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org ยป



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');



SCGIClient(port, [host], [opts])(request, response)
SCGIClient(path, [opts])(request, response)

opts = {
	mountPoint: '', // when you have 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

Missing things

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.