-
Notifications
You must be signed in to change notification settings - Fork 24
Allow specifying a hostname with Node.HTTP.listen #12
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
Conversation
Looks good to me, but do you think we should consider using |
I don't think so, since the node API takes positional arguments. |
Does this cover all of them now? |
Oh yeah oops - there are two additional ways of calling this that this PR doesn't cover. There is another optional argument, which is the maximum length of the queue of pending connections (an integer). You can also supply a file name instead of a port and hostname in order to have the server listen on a unix socket, apparently. I think the unix socket version should maybe be a separate function, though. Also you can omit the port to have a random OS-assigned port, so it might make sense for the purescript api to allow you to omit the port too? |
Maybe |
Annoyingly, if you want to supply a hostname, you have to supply a port too, because it uses optional positional arguments. Likewise, if you want to supply a backlog, you have to supply both a hostname and a port. So |
You could use |
Right, but |
You can't use |
Nope:
|
(node.js v6.9.1) |
a276b83
to
2485bb4
Compare
2485bb4
to
7042daa
Compare
👍 LGTM |
Thanks for the review! |
No description provided.