Skip to content

HTTP.createServer then close after one connection #46

Closed
@jamesdbrock

Description

@jamesdbrock

I want to close an HTTP server after one connection. It seems to be impossible? The variable server is not defined at close server.

  server <- createServer \request response -> do
    respond request response
    close server (pure unit)

It looks like this is impossible because the Node.js API is bad. createServer is just a wrapper for the Node.js http.createServer function. But still.

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