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

Implement all suitable warp functions used for run an application #1

Open
jneira opened this issue May 16, 2017 · 0 comments
Open

Implement all suitable warp functions used for run an application #1

jneira opened this issue May 16, 2017 · 0 comments

Comments

@jneira
Copy link
Owner

jneira commented May 16, 2017

  • runEnv :: Port -> Application -> IO ()

    "Run an 'Application' on the port present in the @PORT@
    environment variable. Uses the 'Port' given when the variable is unset.
    This calls 'runSettings' with 'defaultSettings'."

  • runSettings :: Settings -> Application -> IO ()
    • This can be hard and maybe some options cant be ported to servlet container
    • And we have to duplicate warp settings
  • withApplication*

    Runs the given 'Application' on a free port. Passes the port to the given
    operation and executes it, while the 'Application' is running. Shuts down the
    server before returning.

  • testWithApplication*

    Same as 'withApplication' but with different exception handling: If the
    given 'Application' throws an exception, 'testWithApplication' will re-throw
    the exception to the calling thread, possibly interrupting the execution of
    the given operation.

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

No branches or pull requests

1 participant