turing-status

Aggregation of sub-statuses and express routes for an html and json status report.

Usage no npm install needed!

<script type="module">
  import turingStatus from 'https://cdn.skypack.dev/turing-status';
</script>

README

turing-status

version license

Aggregation of sub-statuses and express routes for an html and json status report.

API

HTTP GET with Accept header application/json will yield to a json response.
HTTP GET with Accept header text/html will yield to an html response.

Simply require turing-status and add the router to your turing-server.

const TuringStatus = require('turing-status');

app.use(new TuringStatus());

To add a sub-status call addStatusDetail(name, status, message) on you turing-server.

server.addStatusDetail('my-status-detail', 'OK', 'Everything is fine.');

Config

  • turing:server:routes:internal - The base-url of internal endpoints like health or status. (default: "/internal")
  • turing:status:route - The relative url of the status endpoint behind the internal route. (default: "/status")

Status Information Config

You can set additional status information by using the following configurations

Inside package.json
  • name - The name of the application.
  • description - A short description of the application's purpose.
  • version - The version of the application.
  • commit - The current commit hash of the application.
  • repository.url - The repository url of the application
  • dependencies - A list of the application's dependencies.
Inside Config
  • turing:status:application:group - The group of services, this application is part of.
  • turing:server:port - The server port.
  • turing:status:team:name - The name of the team.
  • turing:status:team:contact:technical - The technical contact.
  • turing:status:team:contact:business - The business contact.

Contributors

  • Benedikt Stemmildt
  • Jonathan Meyer

License

Apache-2.0