Skip to content
This repository has been archived by the owner on Apr 8, 2019. It is now read-only.

Assignment 2 - extract version route to plugin #63

Closed
wants to merge 6 commits into from
Closed

Assignment 2 - extract version route to plugin #63

wants to merge 6 commits into from

Conversation

toboid
Copy link

@toboid toboid commented Mar 22, 2015

#43


internals.versionInfo = { version: Package.version };

module.exports.register = function (server, options, next) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can just say exports.register, no need to add module

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks

@hueniverse hueniverse added this to the 0.0.2 milestone Mar 23, 2015
config: {
description: 'Returns the version of the server',
handler: function (request, reply) {
server.register(Version, function (registerErr) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless you need to access errors on multiple levels, just call it err. It's a standard.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will do, thanks

@hueniverse hueniverse closed this Mar 24, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants