1.0.9 • Published 5 months ago

elysia-requestid v1.0.9

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

Elysia Request ID

Elysia plugin to create or forward Request IDs.

Installation

bun add --exact elysia-requestid

Usage

import { requestID } from "elysia-requestid"; // 1. Import
import Elysia from "elysia";

new Elysia()
  .use(requestID()) // 2. Use
  .get("/", ({ requestID }) => {
    return `Hello ${requestID}`; // 3. Available in Context
  })
  .listen(3000);

Options (with defaults)

requestID({
  // The function to use to generate a request ID
  uuid: crypto.randomUUID,

  // The header to use for the request ID
  header: "X-Request-ID",
});
1.0.9

5 months ago

1.0.8

6 months ago

1.0.7

6 months ago

1.0.6

6 months ago

1.0.5

7 months ago

1.0.4

7 months ago

1.0.3

7 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago