# server-timi

> Server timing API plugin for hapi

Latest version **1.0.0** (published 2020-01-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install server-timi
pnpm add server-timi
yarn add server-timi
bun add server-timi
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2020-01-04 |
| First published | 2018-03-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10.0.0 |
| Dependencies | 0 |
| Unpacked size | 5.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Colin J. Ihrig |
| Maintainers | cjihrig |
| Keywords | hapi, server, timing |

## Links

- npm: https://www.npmjs.com/package/server-timi
- Repository: https://github.com/cjihrig/server-timi
- Issues: https://github.com/cjihrig/server-timi/issues
- npm.io page: https://npm.io/package/server-timi

## Recent versions

- 1.0.0 (latest) — 2020-01-04
- 0.1.0 — 2018-03-31

## README

# server-timi

[![Current Version](https://img.shields.io/npm/v/server-timi.svg)](https://www.npmjs.org/package/server-timi)
[![Build Status via Travis CI](https://travis-ci.org/cjihrig/server-timi.svg?branch=master)](https://travis-ci.org/cjihrig/server-timi)
![Dependencies](http://img.shields.io/david/cjihrig/server-timi.svg)
[![belly-button-style](https://img.shields.io/badge/eslint-bellybutton-4B32C3.svg)](https://github.com/cjihrig/belly-button)

[Server timing API](https://w3c.github.io/server-timing/) plugin for [hapi](https://github.com/hapijs/hapi).

## Example

`server-timi` does not accept any options. To use it, register the plugin with a hapi server, and the `Server-Timing` header will be automatically added to the server's responses.

```javascript
'use strict';
const Hapi = require('@hapi/hapi');
const ServerTimi = require('server-timi');

async function main () {
  const server = Hapi.server({ port: 8080 });

  await server.register({ plugin: ServerTimi });

  server.route({
    method: 'GET',
    path: '/foo',
    handler (request, h) {
      return { foo: 'bar' };
    }
  });

  await server.start();
}

main();
```

---
_Source: https://npm.io/package/server-timi · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
