strongloop/loopback — pull request #138 by bajtos (2014-01-14 07:12:19+00:00)
Title: Replace `on` with `once` in middleware examples

Fix the jsdox for `app.installMiddleware` to use `app.once` for
listening on 'middleware:*' events.

The previous doc version using `on` was a sort of preliminary
pessimisation, becase the event handlers would stay in the heap
for the whole life-time of the app, even though they won't be called
more than once.

/cc: @ritch

See also the [comment](https://github.com/strongloop/loopback-workspace/pull/37#discussion_r8849677) in loopback-workspace#37.