Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make createServer API be consistent with httpServer on node core #10

Merged
merged 1 commit into from
Aug 28, 2014

Conversation

KrishnaSwathi
Copy link
Contributor

I was trying to use dnsd like I normally call my http node server:

var dnsd = require('dnsd'),
      port = 3737

dnsd.createServer(function (req, res) {
  res.end('1.2.3.4')
}).listen(port, function () {
  console.log('started on %s', port) 
})

dnsd was wrongfully using the callback function as the ip, which caused side effects.

This patch prevents this behavior and re-introduces the same api as node http create server.

I couldn't find how to add tests and documentation for this change, but will provide them at your request

@indexzero
Copy link
Contributor

LGTM.

indexzero added a commit that referenced this pull request Aug 28, 2014
Make createServer API be consistent with httpServer on node core
@indexzero indexzero merged commit 3f7c0d2 into iriscouch:master Aug 28, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants