{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE NoImplicitPrelude #-} -- | Jr Web UI - Main module that re-exports the API and provides the run function. -- -- The web interface is split into submodules: -- - Types: Data types for pages, partials, and forms -- - Components: Reusable UI components and helpers -- - Pages: Full page ToHtml instances -- - Partials: HTMX partial ToHtml instances -- - Handlers: Servant handler implementations -- - Style: CSS styling -- -- : dep warp -- : dep servant-server -- : dep lucid -- : dep servant-lucid module Omni.Jr.Web ( run, defaultPort, -- Re-exports for external use API, server, ) where import Alpha import qualified Network.Wai.Handler.Warp as Warp import Omni.Jr.Web.Handlers (API, api, server) import Omni.Jr.Web.Pages () import Omni.Jr.Web.Partials () import Servant (serve) defaultPort :: Warp.Port defaultPort = 8080 run :: Warp.Port -> IO () run port = do putText <| "Starting Jr web server on port " <> tshow port Warp.run port (serve api server)