modcgi

1.0.3 • Public • Published

modcgi: a simple way to serve CGI executables

INSTALL

$ npm install modcgi

QUICK START

var http = require('http');
var cgi = require('modcgi');
 
http.createServer(cgi.createApp('path/to/cgi', {
  // Set debug level, 0 = no debug (default), 1 = info, 2 = debug, 3 = very verbose (more debug messages)
  debug: 2,
  // Set the current working directory of the cgi script
  cwd: 'path/',
  // Set the virtual path the script will use to respond
  // Defaults to '/' if ommited
  scriptName: '/'
}).listen(80);

Why modcgi?

I previously found a package called cgi that was designed to achieve the same purpose as modcgi. I found two big issues though :

  • It was depending on two submodules written by the same author making the code too complex for what it did
  • It had a nasty bug causing some request to fail and never return properly (thus giving the client the impression its page was loading while, in fact, nothing was happening anymore)

Thus, I decided to write my own version. It is meant to be very minimalist but to allow at least some level of configuration.

If you have any problem using this module, any issue you want addressed, please feel free to contact me by email. You can find updated contact information in the package's metadata.

Versionning scheme

The versionning scheme of this package will try to follow the following: <architectural_change>.<breaking_change>.<non_breaking_change>, meaning

  • Update from 1.0.x to 1.0.y is probably safe. It might add feature, configuration options, but should not break any existing code.
  • Update from 1.x.y to 1.a.b is probably unsafe and should require some testing on your side before releasing because at least part of the API was changed
  • Update from 1.x.y to 2.a.b is very likely to break everything and you should read documentation & test your code thouroughly before releasing

LICENSE

This module is released under the [MIT License] [license].

[license] : http://www.opensource.org/licenses/mit-license.php

Readme

Keywords

none

Package Sidebar

Install

npm i modcgi

Weekly Downloads

0

Version

1.0.3

License

none

Last publish

Collaborators

  • even