Express middleware that will simplify ajax calls.