Add the current git sha as a response header

Add an 'X-Git-SHA' header to each response

$ npm install connect-gitsha

Like any other middleware:

var express = require('express')
  , gitsha  = require('gitsha')

var app = express();


Because it's nice to know what rev of your software is running

  1. git needs to be in the path of the application user
  2. the working directory needs to be within the git repository