connected
Error first callback for listening on the server.
Last updated 12 years ago by V1 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install connected 
SYNC missed versions from official npm registry.

connected

This module is born out of an annoyance with the Node core. Every method that receives a callback is called using an error first callback. But this is not the case with servers. When you tell the server to start listening on the given port it can will emit an error event when it failed.

Installation

npm install connected --save

Usage

var connected = require('connected')
  , http = require('http');

var app = http.createServer(function (req, res) {
  res.end('wobble wobble');
});

connected(app, 80, function (err) {
  // Received an error because we are not allowed to listen on port 80
});

And thats it.

License

MIT

Current Tags

  • 0.0.2                                ...           latest (12 years ago)

3 Versions

  • 0.0.2                                ...           12 years ago
  • 0.0.1                                ...           12 years ago
  • 0.0.0                                ...           13 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 1
Dependencies (0)
None
Dev Dependencies (3)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |