Add an 'X-Git-SHA' header to each response
$ npm install connect-gitsha
Like any other middleware:
var express = require('express')
, gitsha = require('connect-gitsha')
;
var app = express();
app.use(gitsha());
Because it's nice to know what rev of your software is running
- git needs to be in the path of the application user
- the working directory needs to be within the git repository