diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/Main.hs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/app/Main.hs b/app/Main.hs new file mode 100644 index 0000000..000726d --- /dev/null +++ b/app/Main.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE OverloadedStrings #-} +module Main where + +import Cana +import Cana.Protocol +import Cana.Router + +defaultResponse :: GeminiResponse +defaultResponse = GeminiResponse + { responseStatus = codeSuccess + , responseMeta = "text/gemini" + , responseData = "# Hello World\nThis page was served by Cana." + } + +main :: IO () +main = runGeminiServer Nothing defaultGeminiPort "certificate.crt" "private.key" + [ (anyRoute, const $ return defaultResponse) + ] |