Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { AppEnv string // "production" or "development" AssetRoute string // The route to serve assets from, e.g. "/assets" FrontendDir string // The path to the frontend folder, where your React app lives GeneratedTypesPath string // The path to the generated types file PropsStructsPath string // The path to the Go structs file, the structs will be generated to TS types LayoutFilePath string // The path to the layout file, relative to the frontend dir LayoutCSSFilePath string // The path to the layout css file, relative to the frontend dir TailwindConfigPath string // The path to the tailwind config file HotReloadServerPort int // The port to run the hot reload server on, 3001 by default }
Config is the config for starting the engine
type Engine ¶
type Engine struct { Logger zerolog.Logger Config *Config HotReload *HotReload CacheManager *cache.Manager CachedLayoutCSSFilePath string }
func (*Engine) BuildLayoutCSSFile ¶
BuildLayoutCSSFile builds the layout css file if it exists
func (*Engine) RenderRoute ¶
func (engine *Engine) RenderRoute(renderConfig RenderConfig) []byte
RenderRoute renders a route to html
Source Files
¶
Click to show internal directories.
Click to hide internal directories.