Package Exports
- server-timi
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (server-timi) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
server-timi
Server timing API plugin for 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.
'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();