UNPKG

actionhero

Version:

actionhero.js is a multi-transport API Server with integrated cluster capabilities and delayed tasks

13 lines (11 loc) 278 B
exports.randomNumber = { name: 'randomNumber', description: 'I am an API method which will generate a random number', outputExample: { randomNumber: 0.123 }, run: function(api, data, next){ data.response.randomNumber = Math.random(); next(null); } };