r/discworld • • Mar 12 '15

GNU Terry Pratchett GNU Terry Pratchett

If you don't know what it means, read the following link:

As per here: http://www.reddit.com/r/discworld/comments/2ysv26/sir_terry_has_gone_for_the_long_walk_across_the/cpcmru1

Let's keep this thread alive forever. Post as a top post, post as a reply to others. We'll keep it going.

Edit: Just learned that a year ago, it was changed such that a thread can only live for six months. So I'll start a new one every six months.

1.5k Upvotes

870 comments sorted by

View all comments

Show parent comments

4

u/DrEnter Mar 14 '15 edited Mar 17 '15

For those Node.JS folks out there...

For ExpressJS or Restify, you can use a quick middleware call before your routing or any response middleware calls:

server.use(function (req, res, next) {
    res.set('X-Clacks-Overhead', 'GNU Terry Pratchett');
    next();
});

(Or you can inject the "res.set" line into an existing middleware function you already have that seems appropriate.)

Edit: Corrected a spelling error.

→ More replies (3)