mirror of
https://github.com/zhigang1992/deployd.git
synced 2026-05-13 21:06:16 +08:00
14 lines
343 B
JavaScript
14 lines
343 B
JavaScript
var Resource = require('deployd/lib/resource')
|
|
, util = require('util');
|
|
|
|
function Hello(settings) {
|
|
Resource.apply(this, arguments);
|
|
}
|
|
util.inherits(Hello, Resource);
|
|
module.exports = Hello;
|
|
|
|
Hello.prototype.handle = function (ctx, next) {
|
|
if(ctx.req && ctx.req.method !== 'GET') return next();
|
|
|
|
ctx.done(null, {hello: 'world'});
|
|
}; |