serras / miso-start-template

Template for new Miso projects
BSD 3-Clause "New" or "Revised" License
11 stars 2 forks source link

Miso Start Template

Copy the files and start hacking your Miso app!

Prepare the build

  1. Install Nix
  2. Optionally set up a binary cache:
    1. Install Cachix: nix-env -iA cachix -f https://cachix.org/api/v1/install
    2. Use the Miso cache: cachix use miso-haskell

Build and run the project

nix-build
open ./result/bin/miso-app.jsexe/index.html

Build the project in a nix-shell

nix-shell -A env
cabal build
open `find dist-newstyle/ -name index.html`

Update dependencies

The default.nix file has a couple of lines which indicate the "state of the world" for the build system:

The example also shows how you can re-wire the Hackage information to make some packages use a different version from the latest (servant in our case), and how to bring a package from a GitHub repository.