generated from coulomb/repo-seed
- flake.nix adapted from inter-hub: appName=ihp-railiance-probe, stripped to core packages, GHC 9.10.3 Bug 1+2 overlays carried verbatim (pname check updated to ihp-railiance-probe-models) - IHP project scaffold: Main.hs, Config.hs, App.cabal, Setup.hs, Makefile - Schema: probes table (id, name, created_at) - Health endpoint: GET /healthz → "ok" (HealthController) - Probes CRUD: ProbesController + 4 views (Index, New, Show, Edit) - Hspec test suite: Test/ProbeControllerSpec covers /probes and /healthz - Helm chart in chart/: deployment, service, ingress, secret templates - devenv.nix, devenv.yaml, .ghci, tailwind config Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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>
|
|
|]
|