YAME — Yet Another Miso Example
This Miso example is derived from the haskell-miso website source code, but adds dynamic retrieval of objects via a REST API.
Miso
Miso is a small, production-ready, component-oriented, reactive, isomorphic Haskell front-end framework for quickly building highly interactive single-page web and mobile applications. It features a virtual-dom, recursive diffing / patching algorithm, attribute and property normalization, event delegation, event batching, SVG, 2D/3D Canvas (WebGL), Server-sent events SSE, Websockets, type-safe servant -style routing and an extensible Subscription-based subsystem. Inspired by Elm and React. Miso is pure by default, but side effects can be introduced into the system via the Effect data type.
YAME
YAME example program for Miso reads objects from a real REST API which is ready to handle HTTP requests. Can be used for demo projects, testing, learning or even educating someone else. The REST API supports main HTTP methods such as GET, POST, PUT, DELETE and PATCH."
There are different build targets (Makefile):
- wasm for the WASM target that will run in the browser
- haskell for the Haskell target that will prerender
- hls for Haskell Language Server (HLS support in editor)
To build and serve (for development):
make releaseto build everything and prerender.make wasmto enter WASM dev and thenmake serveto serve the site.
To develop:
make hlsto enter HLS context and then start e.g.emacsto edit the site.make wasmto enter Haskell WASM dev and thenmake build.make haskellto enter Haskell dev and thenmake prerender.
The project is on Codeberg: photonsphere/yame and is deployed here: yame.photonsphere.org.