Skip to content

Instantly share code, notes, and snippets.

@sberryman
Created March 4, 2012 02:13
Show Gist options
  • Save sberryman/1970083 to your computer and use it in GitHub Desktop.
Save sberryman/1970083 to your computer and use it in GitHub Desktop.
Create a restify server changing the `X-Response-Time` header to `X-Runtime` and also changing the value from milliseconds to seconds
app = module.exports = restify.createServer({
name: 'restify',
version: '1.0.0',
responseTimeHeader: 'X-Runtime',
responseTimeFormatter: function(durationInMilliseconds) {
return durationInMilliseconds / 1000;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment