joyent-portal/spikes/graphs-fe/chartjs/server/routes/version.js

19 lines
350 B
JavaScript
Raw Permalink Normal View History

2016-11-08 16:43:04 +02:00
const Pkg = require('../../package.json');
const internals = {
response: {
version: Pkg.version
}
};
module.exports = (server) => {
server.route({
method: 'GET',
path: '/ops/version',
config: {
description: 'Returns the version of the server',
handler: (request, reply) => reply(internals.response)
}
});
};