X-Git-Url: http://git.pjr.cc/?p=nodejsws.git;a=blobdiff_plain;f=examples%2Fsimple%2Fpurls%2Fjustlayout.js;h=050a4fc37d8b29e8421871c788f0f5f05f93a751;hp=a108a99032400dbf4d8f893a91dabdc380e6d375;hb=f1c421a22a684a5eebc3e44f08228b23716b95e8;hpb=cbf61e4971ed5371fa05018756dfbf78dc96b54c diff --git a/examples/simple/purls/justlayout.js b/examples/simple/purls/justlayout.js index a108a99..050a4fc 100644 --- a/examples/simple/purls/justlayout.js +++ b/examples/simple/purls/justlayout.js @@ -1,3 +1,13 @@ +/* + * this is an example of a purl that simply contains a layout and only a layout + * + * this is useful when you can do everything synchronously and just need to fling back + * some content - if you tie layout to preRequest you can make preRequest determine + * if you can simply use layout to push some simple html out and this simplifies the + * whole request pipeline. + */ + + exports.layout = function(request, response) { var tkl = "

Just a Layout

this purl is simply a layout"; tkl += " and nothing else!";