Skip to content

Instantly share code, notes, and snippets.

@seizans
Created July 20, 2012 13:35
Show Gist options
  • Save seizans/3150737 to your computer and use it in GitHub Desktop.
Save seizans/3150737 to your computer and use it in GitHub Desktop.
Httpsで通信。defaultSettings だと Port は 3000。
{-# LANGUAGE OverloadedStrings #-}
module Https where
import Network.Wai
import Network.Wai.Handler.Warp
import Network.HTTP.Types
import Network.Wai.Handler.WarpTLS
server :: Application
server _ = return $ ResponseFile status200 [] "index.html" Nothing
main :: IO ()
main = runTLS (TLSSettings "server.crt" "server.key") defaultSettings server
--main = run 8080 server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment