SignalK/server-prototype — pull request #2 by fabdrol (2014-09-14 13:57:56+00:00)
Title: Added parsing of CLI arguments and forwarding to Providers

In this branch I've added the parsing of CLI arguments (using minimalist) and forwarding these to all Providers. Providers now receive the server (`app`) instance as the first argument to the `init` method, through which they can access the parsed arguments.

- Launch the server with the following argument: `node ./index --execute=echo\ '{ "some": [ "stringified", "signal", "k" ] }'
- `execute.js` runs with the command specified after `--execute=`. `execute.js` should give a good idea of how this is achieved and provide a starting point for Provider development.

Access to the CLI arguments in a Provider can be achieved by:
- Accessing the parsed arguments at `app.argv` (returns a plain object with the arguments and their names)
- Accessing the raw arguments array at `app.__argv`

Since the server instance is provided to the `init()` method by default, Providers could also add route endpoints to the web server (app is a Express instance wrapped with some extra information).

Other changes:
- I've updated my editor settings, should be 2 spaces soft-tabs (=indents) now. If a file is still 4-space hard-tabs, that is because I haven't touched
- Updated `package.json` to the right name and the right repo URL, also added a "contributors" list
- Removed bonjour.js