37 lines
930 B
Haskell
37 lines
930 B
Haskell
|
|
module Web.FrontController where
|
||
|
|
|
||
|
|
import IHP.RouterPrelude
|
||
|
|
import IHP.ControllerPrelude
|
||
|
|
import IHP.ViewPrelude (Html, hsx, Layout)
|
||
|
|
import Generated.Types
|
||
|
|
import Web.Types
|
||
|
|
import Web.Routes ()
|
||
|
|
|
||
|
|
import Web.Controller.Health ()
|
||
|
|
import Web.Controller.Probes ()
|
||
|
|
|
||
|
|
instance FrontController WebApplication where
|
||
|
|
controllers =
|
||
|
|
[ parseRoute @HealthController
|
||
|
|
, parseRoute @ProbesController
|
||
|
|
]
|
||
|
|
|
||
|
|
instance InitControllerContext WebApplication where
|
||
|
|
initContext = do
|
||
|
|
setLayout defaultLayout
|
||
|
|
|
||
|
|
defaultLayout :: (?context :: ControllerContext, ?request :: Request) => Layout
|
||
|
|
defaultLayout inner = [hsx|
|
||
|
|
<!DOCTYPE html>
|
||
|
|
<html lang="en">
|
||
|
|
<head>
|
||
|
|
<meta charset="UTF-8" />
|
||
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||
|
|
<title>ihp-railiance-probe</title>
|
||
|
|
</head>
|
||
|
|
<body>
|
||
|
|
{inner}
|
||
|
|
</body>
|
||
|
|
</html>
|
||
|
|
|]
|