Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

elysia-http-status-code

sylvain12190MIT1.0.7

Simple http status code plugin for Elysia.js.

elysia, http-status-code

readme

Elysia Http Status Code

Simple http status code plugin for Elysia.js.

Installation

bun add elysia-http-status-code

Usage

import Elysia from 'elysia'
import { HttpStatusCode } from 'elysia-http-status-code';

new Elysia()
  .use(HttpStatusCode())
  .get('/'. ({set, httpStatus}) => {
    set.status = httpStatus.HTTP_200_OK;
    return `Hello With response ${httpStatus.HTTP_200_OK}`;
  })
  .post('/user', ({set, body, httpStatus}) => {
    set.status = httpStatus.HTTP_201_CREATED;
    return {"user": body.name}
  })
  .listen(3000);

changelog

elysia-http-status-code

1.0.7

Patch Changes

  • Change package README content

1.0.7

Patch Changes

  • Launch pipeline on launch

1.0.6

Patch Changes

  • Change pipeline launch on release

1.0.5

Patch Changes

  • dd8328d: Fix changeset checking before publishing package

1.0.4

Patch Changes

  • 6e5e9a2: Changeset checking before publish

1.0.3

Patch Changes

  • 2f1bed3: Add changeset check before publish

1.0.1

Patch Changes

  • 2e77df2: Change package description

1.0.0

Major Changes

  • a42b09b: Elysia plugin for https status code in text format