I made something in the Swift 1.0 days called &quot;swell&quot; that shows how this might look.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;breckinloggins&#x2F;Swell" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;breckinloggins&#x2F;Swell</a><p>It could be used as an example. In particular, the &quot;builder&quot; syntax that I did with a terrible TLS context hack could be replaced with autoclosures (I think).<p>Edit: more Sinatra-like than Express-like, but the idea still stands.