chrisdickinson/beefy — pull request #44 by dazld (2014-06-01 17:04:17+00:00)
Title: Add options to serve all accepts html requests with a defined html document

Adds two new options to the CLI interface:

`-s` or `--spa` - instructs beefy to try and run in single page app mode
`-sr` or `--spa-root` - gives name of html document to use for single page app requests

When running in this mode, beefy will check that the file exists, and throw an error with the path it was looking at if it cannot find it, and exit.

When the user just specifies the `-s` option, we assume that the `spa-root` file is index.html, and we check for the presence of it as if we had explicitly specified this.

If all this is ok, beefy then maps all requests that would previously have been served with the fake index, with our specific HTML file, enabling fun stuff like html5 history enabled applications that use these paths to deep link into app functions.

Live reload also continues to function as expected, and any requests for existing files also continue to work.