How to use the @promster/express.getSummary function in @promster/express

To help you get started, we’ve selected a few @promster/express examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github commercetools / merchant-center-application-kit / packages / mc-http-server / routes / metrics.spec.js View on Github external
it('should invoke `end` on the `response` with the `getSummary` metrics', () => {
      expect(response.end).toHaveBeenCalledWith(getSummary());
    });
  });
github commercetools / merchant-center-application-kit / packages / mc-http-server / routes / metrics.js View on Github external
module.exports = function metrics(request, response) {
  if (
    request.headers &&
    request.headers.via &&
    request.headers.via.includes('google')
  ) {
    response.statusCode = 200;

    response.end();
  } else {
    response.statusCode = 200;

    response.setHeader('Content-Type', getContentType());
    response.end(getSummary());
  }
};

@promster/express

Express server integrations of promster

MIT
Latest version published 7 months ago

Package Health Score

76 / 100
Full package analysis