forked from digitallyinduced/ihp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Main.hs
34 lines (27 loc) · 792 Bytes
/
Main.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
module Main where
import IHP.Prelude
import IHP.Environment
import IHP.FrameworkConfig
import qualified IHP.Server
import IHP.RouterSupport
import IHP.ControllerPrelude
import IHP.Mail
--import IHP.GenericController
data DemoController = DemoAction deriving (Eq, Show, Data)
instance AutoRoute DemoController
instance InitControllerContext RootApplication
instance FrontController RootApplication where
controllers =
[ parseRoute @DemoController
, startPage DemoAction
]
instance Controller DemoController where
action DemoAction = renderPlain "Hello World!"
instance Worker RootApplication where
workers _ = []
config :: ConfigBuilder
config = do
option Development
option $ AppHostname "localhost"
main :: IO ()
main = IHP.Server.run config