<commit_before>Router
------

TBD<commit_msg>Adds info about router<commit_after>Router
------

For server and client purposes we use [director][] router.
Routes are described in YAML and then later on bounded to `nodeca.router`, where
director lives.

Example:

``` yaml
---
routes:
  "/:forum_id/:thread_id.html": nodeca.server.forums.threads.show
  # if we have messed params order we can remap it like this:
  "/:thread_id/:forum_id":
    to: nodeca.server.forums.forums.list
    remap: [ 1, 0 ]

params:
  forum_id: !!js/regexp /f(\d+)/
  thread_id: !!js/regexp /thread(\d+)/
```

Upon application start we read YAML description of routes and configure server
router with given definition. Parsed router configuration is sent to client as
part of the client config under `router` section:

```
nodeca.config.router = {
  routes: {
    "/:forum_id/:thread_id.html": "nodeca.server.forums.threads.show",
    // ...
  },
  params: {
    // ...
  }
};
```

[director]: https://github.com/flatiron/director
{'fraction_non_alphanumeric': 0.14612326043737575, 'fraction_numerical': 0.0019880715705765406, 'mean_word_length': 3.3973799126637556, 'pattern_counts': {'":': 3, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2067661', 'n_tokens_mistral': 346, 'n_tokens_neox': 332, 'n_words': 98}