X-Git-Url: http://git.pjr.cc/?p=nodejsws.git;a=blobdiff_plain;f=examples%2Fsimple%2Fpurls%2Fjustlayout.js;h=050a4fc37d8b29e8421871c788f0f5f05f93a751;hp=f02b4398c213825e6db9118e43c5e305dd6a82f7;hb=f1c421a22a684a5eebc3e44f08228b23716b95e8;hpb=6127f038fce5dbe47be01fdc565c14b5d8d24b80 diff --git a/examples/simple/purls/justlayout.js b/examples/simple/purls/justlayout.js index f02b439..050a4fc 100644 --- a/examples/simple/purls/justlayout.js +++ b/examples/simple/purls/justlayout.js @@ -1,5 +1,15 @@ +/* + * 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 simple a layout"; + var tkl = "

Just a Layout

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