I've created this example to have easy reference code how to use elm-lang/navigation without using hashes.
This example is based on:
- general structure taken from https://github.com/elm-lang/navigation/tree/master/examples
- the routing part from https://github.com/ohanhi/elm-taco
To set up on your own computer, you will need git
, elm-0.18
, node.js
, yarnpkg
.
Also web browser with support of Object.assign for loading env.js
. There is also polyfill.
Simply clone the repository and:
$ cp .env.example .env
$ ./client/tools/build-dev.sh
Based on https://12factor.net/config
You will get dist/js/env.js
which is loaded to elm through flags.
Start server.
Start db.
In another terminal run:
$ ./client/tools/browsersync.js
Then navigate your browser to http://localhost:8000.