The best way to get started with Ema is via Nix, 1 using the template repository:
- Install Nix 1 and enable Flakes
- Clone the template repository locally
-
Run
nix develop -c , run
and access the site at http://localhost:9001
Step 3 starts the Ema Live Server displaying a simple website. Try modifying the HTML DSL in the Haskell source ./src/Main.hs
, and observe how the browser-view updates instantly.
Next, in the tutorial series we will create a trivial site from scratch and then evolve it towards a feature-rich one.
Nix is optional to use Ema, and the template repository may work with plain
cabal
. However, Nix provides the best development experience. See this blog post if you are a Haskell developer new to Nix.