xich/scotty — pull request #43 by dmjio (2013-09-07 10:52:03+00:00)
Title: Added ssl support for Scotty

This (in theory) adds site-wide SSL to Scotty. Just integrated Scotty with the warp-tls package. I'm no SSL expert, but here's my use case. Sorry about the formatting changes, I blame emacs. If running Scotty behind nginx this probably won't be necessary, but stand-alone would be...

Generated a self-signed certificate with key for testing via this heroku doc: https://devcenter.heroku.com/articles/ssl-certificate-self

```haskell
{-# LANGUAGE OverloadedStrings #-}

import Web.Scotty

main :: IO ()
main = scottySSL 3000 "server.crt" "server.key" $ do
get "/" $ do
html "ok"
```