Skip to content

Allow me to specify port AND hostname on .listen() #675

@andyuk

Description

@andyuk

Hi,

It's important in my app that it listens on a specific IP address. Having the option to pass the hostname would solve this.

Currently I can only use:
.listen(port)

I am working around this by creating a HTTP server myself.

How about supporting:

var options = {
port: 80,
hostname: 'localhost'
};
.listen(options)

Supporting a config option would mean it could still be backwards compatible.

Thanks,
Andy

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions