{"id":48685319,"url":"https://github.com/haskell-miso/miso-sampler","last_synced_at":"2026-04-11T04:01:07.055Z","repository":{"id":296768699,"uuid":"994412487","full_name":"haskell-miso/miso-sampler","owner":"haskell-miso","description":":bento: A sample miso application for getting started quickly","archived":false,"fork":false,"pushed_at":"2026-04-04T16:27:12.000Z","size":98,"stargazers_count":12,"open_issues_count":1,"forks_count":9,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-11T04:00:10.780Z","etag":null,"topics":["getting-started","haskell","miso","website"],"latest_commit_sha":null,"homepage":"https://sampler.haskell-miso.org/","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/haskell-miso.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"open_collective":"miso","github":["dmjio"]}},"created_at":"2025-06-01T21:56:29.000Z","updated_at":"2026-04-04T16:27:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"e24220ea-87f8-4540-9898-1b16276b267e","html_url":"https://github.com/haskell-miso/miso-sampler","commit_stats":null,"previous_names":["dmjio/miso-sampler","haskell-miso/miso-sampler"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/haskell-miso/miso-sampler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haskell-miso%2Fmiso-sampler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haskell-miso%2Fmiso-sampler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haskell-miso%2Fmiso-sampler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haskell-miso%2Fmiso-sampler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haskell-miso","download_url":"https://codeload.github.com/haskell-miso/miso-sampler/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haskell-miso%2Fmiso-sampler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31668050,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T17:19:37.612Z","status":"online","status_checked_at":"2026-04-11T02:00:05.776Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["getting-started","haskell","miso","website"],"created_at":"2026-04-11T04:00:17.170Z","updated_at":"2026-04-11T04:01:06.997Z","avatar_url":"https://github.com/haskell-miso.png","language":"Haskell","readme":"🍱 miso-sampler \n====================\n\nThis project contains a sample [miso](https://github.com/dmjio/miso) application with scripts to \ndevelop against vanilla GHC and to compile to Web Assembly or JavaScript.\n\n### Source\n\nView [source](https://github.com/haskell-miso/miso-sampler/blob/main/app/Main.hs).\n\n### Install Nix (w/ flakes enabled)\n\n```bash\n# Install nix \ncurl -L https://nixos.org/nix/install | sh\n\n# Enable flakes\necho 'experimental-features = nix-command flakes' \u003e\u003e ~/.config/nix/nix.conf\n```\n\n\u003e [!TIP] \n\u003e Miso requires installing [nix](https://nixos.org) with [Nix Flakes](https://wiki.nixos.org/wiki/Flakes) enabled.\n\n### Browser mode 🔥\n\nFor interactive development in the browser via the WASM backend\n\n```bash\n$ nix develop .#wasm --command bash -c 'make repl'\n```\n\n```\nPreprocessing executable 'app' for app-0.1.0.0...\nGHCi, version 9.12.2.20250924: https://www.haskell.org/ghc/  :? for help\nOpen http://127.0.0.1:8080/main.html or import http://127.0.0.1:8080/main.js to boot ghci\n```\n\nPaste the URL in your browser. Doing so will cause assets to transfer; you can inspect the network tab, but do not refresh the page. The REPL will load in the terminal\n\n```\nLoaded GHCi configuration from /Users/dmjio/Desktop/miso-sampler/.ghci\n[1 of 2] Compiling Main             ( app/Main.hs, interpreted )\nOk, one module loaded.\nghci\u003e\n```\n\nFinally, to run the example app, run `main` in the `repl`:\n\n```\nghci\u003e main\n```\n\nand you will see\n\n\u003cimg width=\"724\" height=\"607\" alt=\"image\" src=\"https://github.com/user-attachments/assets/b474c48d-3f89-4a97-9d9d-9db8217a02be\" /\u003e\n\nCall `:r` to refresh the page with the latest code. Using `Miso.Run.reload` (as shown below) ensures the `\u003cbody\u003e` and `\u003chead\u003e` are cleared between reloads.\n\n```haskell\nmain :: IO ()\nmain = reload defaultEvents app\n```\n\n### Live reload 🔥\n\nIf you use [ghciwatch](https://github.com/MercuryTechnologies/ghciwatch) you can have live reload functionality (where `main` is executed whenever a file is saved to disk).\n\nWhen combined with the `live` function it is possible to persist the application state between GHCi reloads. This is like `reload`, except your application state will not be cleared.\n\n```haskell\nmain :: IO ()\nmain = live defaultEvents app\n```\n\nSee the [Miso.Reload](https://haddocks.haskell-miso.org/miso/Miso-Reload.html) haddocks for more information.\n\n```bash\n$ nix develop .#wasm --command bash -c 'make watch'\n```\n\n### Development\n\nCall `nix develop` to enter a shell with [GHC 9.12.2](https://haskell.org/ghc)\n\n```bash\n$ nix develop .#wasm\n```\n\nOnce in the shell, you can call `cabal run` to start the development server and view the application at http://localhost:8080\n\n### Build (Web Assembly)\n\n```bash\n$ nix develop .#wasm --command bash -c \"make\"\n```\n\n### Build (JavaScript)\n\n```bash\n$ nix develop .#ghcjs --command bash -c \"make js\"\n```\n\n### Serve\n\nTo host the built application you can call `serve`\n\n```bash\n$ nix develop --command bash -c \"make serve\"\n```\n\n### Clean\n\n```bash\n$ nix develop --command bash -c \"make clean\"\n```\n\n### CI\n\nEnsure that the Haskell miso [cachix](cachix.org) is being used when building your own projects in CI\n\n```yaml\n- name: Install cachix\n  uses: cachix/cachix-action@v16\n  with:\n    name: haskell-miso-cachix\n```\n\n### Hosting\n\nTo upload and host your project to Github Pages, please see [our Github workflow file](https://github.com/haskell-miso/miso-sampler/blob/main/.github/workflows/main.yml#L38-L56) and the necessary Github actions included.\n","funding_links":["https://opencollective.com/miso","https://github.com/sponsors/dmjio"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaskell-miso%2Fmiso-sampler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaskell-miso%2Fmiso-sampler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaskell-miso%2Fmiso-sampler/lists"}