X-Git-Url: http://git.pjr.cc/?p=nodejsws.git;a=blobdiff_plain;f=examples%2Fsimple%2Fpurls%2Fmain.js;h=f2792473d65dccc45ed42a5ff1fbf14c4dea8c65;hp=888876cc56543a6c7c420f8859397715a7464f94;hb=f1c421a22a684a5eebc3e44f08228b23716b95e8;hpb=cbf61e4971ed5371fa05018756dfbf78dc96b54c diff --git a/examples/simple/purls/main.js b/examples/simple/purls/main.js index 888876c..f279247 100644 --- a/examples/simple/purls/main.js +++ b/examples/simple/purls/main.js @@ -1,8 +1,13 @@ + +// the standard layout (which can be seen in layouts.js) includes a body - +// this function is responsible for rendering that body exports.body = function(request, response, callback) { response.write("new body for main"); callback(); } +// before any data is written for a request, this is called and this is where you +// might process post data for example. exports.preResponse = function(request, response, callback) { console.log("this is preresponse for main"); callback();