# \[ANN\] warp-tls-simple: for easily running HTTP/2 servers

**URL:** <https://discourse.haskell.org/t/ann-warp-tls-simple-for-easily-running-http-2-servers/12999>\
**Category:** Announcements\
**Created:** [September 19, 2025, 12:30am UTC](https://discourse.haskell.org/t/ann-warp-tls-simple-for-easily-running-http-2-servers/12999 "2025-09-19T00:30:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![srid](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/srid/32/5514_2.png) [@srid](https://discourse.haskell.org/u/srid)\
**Post date:** [September 19, 2025, 12:30am UTC](https://discourse.haskell.org/t/ann-warp-tls-simple-for-easily-running-http-2-servers/12999/1 "2025-09-19T00:30:01Z")

</div>

> **Background:** For better SSE (servant sent events) performance, I needed to switch to HTTP/2 which further required HTTPS even when running locally. So I created something that creates self-signed certs (using `openssl`, Nix package) on application startup and launches Warp with https configured … all with minimal lines of code (hence the `-simple` prefix).

Full documentation here: [Network.Wai.Handler.WarpTLS.Simple](https://hackage-content.haskell.org/package/warp-tls-simple-0.1.0.2/docs/Network-Wai-Handler-WarpTLS-Simple.html)

Source: [GitHub - srid/warp-tls-simple](https://github.com/srid/warp-tls-simple)

---

<div class="post-metadata">

**Author:** ![Vlix](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/vlix/32/1551_2.png) [@Vlix](https://discourse.haskell.org/u/Vlix)\
**Post date:** [September 19, 2025, 4:21pm UTC](https://discourse.haskell.org/t/ann-warp-tls-simple-for-easily-running-http-2-servers/12999/2 "2025-09-19T16:21:35Z")

</div>

Looks nice! I can see this being useful when working on backend APIs, for sure.

I do wonder why the `relude` and `text` dependencies are in the package. I don’t see them being imported in the one module the package has 🤔  
Have you tried building with [-Wunused-packages](https://downloads.haskell.org/~ghc/latest/docs/users_guide/using-warnings.html#ghc-flag-Wunused-packages)? I always find it helpful to keep the dependencies in check.

---

<div class="post-metadata">

**Author:** ![srid](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/srid/32/5514_2.png) [@srid](https://discourse.haskell.org/u/srid)\
**Post date:** [September 19, 2025, 10:46pm UTC](https://discourse.haskell.org/t/ann-warp-tls-simple-for-easily-running-http-2-servers/12999/3 "2025-09-19T22:46:31Z")

</div>

I’ve released a new version without `relude` and `text`: [warp-tls-simple: Simple TLS configuration for Warp](https://hackage.haskell.org/package/warp-tls-simple-0.1.1.0)

I use `relude` in my applications, but for published libraries it doesn’t make much sense to use a custom prelude.

> [@Vlix](#):
>
> Have you tried building with [-Wunused-packages](https://downloads.haskell.org/~ghc/latest/docs/users_guide/using-warnings.html#ghc-flag-Wunused-packages)? I always find it helpful to keep the dependencies in check.

TIL, thanks. But this is only useful with `-Werror`, right? I cannot make `nix build` fail without also tacking in a `-Werror` (however, that would [prevent](https://github.com/srid/haskell-template/issues/168) the library from being published to hackage).

---

<div class="post-metadata">

**Author:** ![Vlix](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/vlix/32/1551_2.png) [@Vlix](https://discourse.haskell.org/u/Vlix)\
**Post date:** [September 20, 2025, 12:40am UTC](https://discourse.haskell.org/t/ann-warp-tls-simple-for-easily-running-http-2-servers/12999/4 "2025-09-20T00:40:45Z")

</div>

I mostly meant that when developing the library, using that warning will tell you you’re not using certain dependencies. Which you can then remove.

Also, I always get a bit sad when a library doesn’t have a ChangeLog. Though in this case the library is small enough to not make it a big issue.

All in all: good addition to the ecosystem 👍 Thanks

---

<div class="post-metadata">

**Author:** ![srid](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/srid/32/5514_2.png) [@srid](https://discourse.haskell.org/u/srid)\
**Post date:** [September 20, 2025, 12:49am UTC](https://discourse.haskell.org/t/ann-warp-tls-simple-for-easily-running-http-2-servers/12999/5 "2025-09-20T00:49:46Z")

</div>

The ChangeLog is in [the source](https://github.com/srid/warp-tls-simple/blob/master/CHANGELOG.md), just not in cabal file (by accident). I’ve been meaning to write [a ‘releaser’ tool](https://discourse.haskell.org/t/haskell-release-automation/12836/4) – or at least find an existing one – that sanity check things like this before doing `cabal upload`.

---

<div class="post-metadata">

**Author:** ![brandonchinn178](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/brandonchinn178/32/5103_2.png) [@brandonchinn178](https://discourse.haskell.org/u/brandonchinn178)\
**Post date:** [September 20, 2025, 1:48am UTC](https://discourse.haskell.org/t/ann-warp-tls-simple-for-easily-running-http-2-servers/12999/6 "2025-09-20T01:48:58Z")

</div>

> [@srid](#):
>
> TIL, thanks. But this is only useful with `-Werror`, right? I cannot make `nix build` fail without also tacking in a `-Werror` (however, that would [prevent](https://github.com/srid/haskell-template/issues/168) the library from being published to hackage).

Typically, you’d still be developing with -Werror, even for libraries. You could add it on the command line, in cabal.project/stack.yaml, or under a flag in .cabal
