1.0.0 • Published 6 years ago

http-listen v1.0.0

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

http-listen

Helps me set up an HTTP server for one-function modules.

Usage

from howto.js:

module.exports = function (req, res) {
  res.setHeader('Content-Type', 'text/json; charset=UTF-8');
  res.write(JSON.stringify(req.headers, null, 2) + '\n');
  res.end();
};
require('http-listen')(module).loudListen();

Known issues

  • Needs more/better tests and docs.

 

License

ISC