all files / examples/controllers/hello/ name.as.param.js

100% Statements 7/7
100% Branches 0/0
100% Functions 1/1
100% Lines 7/7
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19                       
/**
 * 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!");