4.2.0 • Published 5 months ago

lev-restify v4.2.0

Weekly downloads
15
License
ISC
Repository
github
Last release
5 months ago

Life Event Verification's Restify server

A highly opinionated Restify server for use in the Life Event Verification (LEV) project.

The server features:

  • JSON logging (via Bunyan) and logs special headers provided by keycloak-gatekeeper.
  • A simple liveness health-check on /healthz.
  • 'Secure' headers on every response.
  • Bundled functionality for custom metrics and some helper functions.

Usage

Simple require this package:

const restify = require('lev-restify');

You can then create a Restify server using createServer() and access bundled functionality by accessing properties on the object.

const httpd = restify.createServer({ name: 'my-server' });
const log = httpd.log;

httpd.listen(8080, '0.0.0.0', () => {
  log.info('%s listening at %s', httpd.name, httpd.url);
});

(In addition, the object returned by createServer() has an extra property, .log which contains the logger. This can be used for logging outside the context of a request, when req.log is available.)

Testing

To test changes to this repository simply run:

make test
4.1.0

6 months ago

4.2.0

5 months ago

3.1.0

10 months ago

4.0.0

9 months ago

3.0.0

10 months ago

2.0.1

2 years ago

1.0.1

4 years ago

1.0.0

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago