spserver (or single page server) is a simple helper utlity for creating/running a server for using in pure single-page applications in true MVVM fashion without having to write any node code or using nginx or anything. This can be helpful to jump start making any single-page applications and get it running in seconds.
spserver has two modes of serving files (minimum either has to be specified):
* Single file
* Static folder
When specifying a single file, all url requests will resolve with the contents of said file. This is handy for MVVM applications where the front-end javascript handles all url path routing.
When specifying a static folder, it will first look up the url request on the static folder to see if the file exists. If it doesn't, it falls back to the single file (above) or 404 (if single file was not specified).
A combination of these two will allow you to create a single base.html that will bootstrap your MVVM application with the static folder containing the javascript files. For an example, see the [nfp_www](https://github.com/nfp-projects/nfp_www) project.
The config file (default `config.json`) provides means to configure spserver in greater detail as well as provide optional settings to pass into our template (see template below).
spserver can also help provide any additional info to your single file thanks to lodash: `template`. If template mode is specified, it will parse the single file first through `lodash.template` with the whole config file. This can allow you to specify configuration in your config file and expose them in your single file.