node-fastcgi

node-fastcgi is a drop-in replacement for node’s http module (server only). It can be used to build FastCGI applications or to convert existing node applications to FastCGI.

The implementation is fully compliant with the FastCGI 1.0 Specification.

node-fastcgi is distributed under the open source MIT license.

Usage


var fcgi = require('node-fastcgi');

fcgi.createServer(function(req, res) {
  if (req.method === 'GET') {
    res.writeHead(200, { 'Content-Type': 'text/plain' });
    res.end("It's working");
  } else {
    res.writeHead(501);
    res.end();
  }
}).listen();