UNPKG

radxa-rock

Version:

GPIO interface for the Radxa Rock

23 lines (21 loc) 442 B
var statsConfig = { handler: function(req, reply){ reply({ mem: process.memoryUsage(), uptime: process.uptime(), piid: process.pid }); } }; module.exports = function(options, next){ var config = options.config; var server = options.hapi; server.route([ { method: 'GET', path: config.route + (config.path||'status'), config: statsConfig } ]); next(); };