Skip to content

testability - expose access to InetSocketAddress of HttpServer #19

@szczebel

Description

@szczebel

When running tests on CI/CD, I need to start the application under test on random port with Express.listen(0).
Then I'd like to obtain the actual port number to hand it over to RestAssured (or whatever other rest client)

Proposed addition to express.Express class:

public InetSocketAddress getAddress() {
    return httpServer.getAddress(); 
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions