(app, middleware/access_log).js
-Move the logic that determines whether access logging is
necessary to app.js, since that allows us to maintain the style
of `app.use(require(/* desired middleware module */))` inside
`app.js` without returning a "noop" middleware from
`middleware/access_log.js` in the case that it's unnecessary.
(query, query)/*.js
-Remove unused `../src/logger` `require()`s.
src/logger.js, package.json
-Remove `src/logger` in favor of using `pelias-logger` for all
logging, since it's the Pelias standard.
middleware/500.js
-Replace usage of `src/logger` with pelias-logger.
README.md
-Edit a bunch of unrelated things... sorry. ;)
-Condense the documentation of different `npm run`nable commands
to one list.
-Remove the note about Travis, since that applies to virtually
all the Pelias repos and is documented elsewhere.
-Point the API docs hyperlink to `DOCS.md`.
middleware/500.js
-cf1a483 changed the middleware to return an opaque error
message rather than the error object itself, in case it contains
sensitive information. The problem is that some sanitizers
return a helpful error message (intended to be seen by users) as
a string. Add a conditional to only return the ambiguous,
catchall error message when a non-string `err` object is
received -- this will likely be a stack trace, or something.
middleware/500.js
-Add code to the 500 catchall middleware to report errors to
stdout/stderr.
-Also, stringify the error via `.toString()` before passing it
to `res.json()`, since otherwise an empty object appears to be
returned.
controller/index.js
-Move all of the index page HTML "initialization" code that only
needs to run once, like markdown compilation and `style`
prepending, out of the request handler.