| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 1× 1× 1× 1× 1× 1× 1× | /**
* Serve GET /hello/:name
**/
'use strict';
const debug = require('debug')('lark.examples.controllers.hello.:name');
debug("loading ...");
module.exports = {
GET (ctx, next) {
debug("GET /hello/:name, name is " + ctx.params.name);
ctx.body = 'Hello, ' + ctx.params.name;
return next();
}
}
debug("loaded!");
|