express-suigeneris

1.3.0 • Public • Published

Express Suigeneris

A module that adds the "Suigeneris" header into the response. Creates a new Suigeneris if one is not provided.

Why "suigeneris"?

The term suigeneris was coined by Mark Norman @nzmark. In latin it means, "unique".

Installation

npm install --save express-suigeneris

Usage

let express = require('express');
let suigeneris = require('express-suigeneris');

let app = express();
/**
 * headerName defaults to 'x-request-id' eg:
 * app.use(suigeneris());
 **/ 
app.use(suigeneris({headerName: 'suigeneris'}));

app.get('/', (req, res, next) => {
    res.status(200).send('Hello World!');
});

app.listen(3000, () => {
    console.log('Connected on port 3000');
});

module.exports = app;

Test

$ curl -i http://localhost:3000
HTTP/1.1 200 OK
X-Powered-By: Express
suigeneris: fb6a3951-f1e1-43a7-821b-ae2f454e7713
Content-Type: text/html; charset=utf-8
Content-Length: 12
ETag: W/"c-Lve95gjOVATpfV8EL5X4nxwjKHE"
Date: Fri, 24 Mar 2017 23:36:06 GMT
Connection: keep-alive

Readme

Keywords

Package Sidebar

Install

npm i express-suigeneris

Weekly Downloads

0

Version

1.3.0

License

MIT

Last publish

Collaborators

  • productiondave