Skip to content

Instantly share code, notes, and snippets.

View sberryman's full-sized avatar
🏠
Working from home

Shaun Berryman sberryman

🏠
Working from home
View GitHub Profile
@sberryman
sberryman / gist:1970083
Created March 4, 2012 02:13
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;
}
});