Copyright | (c) Eduardo Trujillo, 2016 |
---|---|
License | Apache |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
The Listeners module includes wrappers for starting TLS and non-TLS Warp servers, with support for IPv4 and IPv6.
- listen :: (MonadLogger m, MonadIO m) => Int -> Application -> m ()
- listenTLS :: (MonadLogger m, MonadIO m) => TLSSettings -> Int -> Application -> m ()
- data TLSSettings :: *
- tlsSettingsChain :: FilePath -> [FilePath] -> FilePath -> TLSSettings
Listeners
listen :: (MonadLogger m, MonadIO m) => Int -> Application -> m () Source #
Serves a WAI Application on the specified port. The target port is printed to stdout before hand, which can be useful for debugging purposes.
listenTLS :: (MonadLogger m, MonadIO m) => TLSSettings -> Int -> Application -> m () Source #
Serves a WAI Application on the specified port. The target port is printed to stdout before hand, which can be useful for debugging purposes.
Re-exports
data TLSSettings :: * #
Settings for WarpTLS.
:: FilePath | Certificate file |
-> [FilePath] | Chain certificate files |
-> FilePath | Key file |
-> TLSSettings |
A smart constructor for TLSSettings
that allows specifying
chain certificates based on defaultTlsSettings
.
Since 3.0.3