Created
July 20, 2012 13:35
-
-
Save seizans/3150737 to your computer and use it in GitHub Desktop.
Httpsで通信。defaultSettings だと Port は 3000。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# 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