Skip to content

jder-std/hono

Repository files navigation

JDER Hono

A response builder for Hono.

This package includes different response builders based on the JSON response structure specified in JSON Data Error Response (JDER). With the builders, various kinds of responses can be created easily instead of sending plain text responses.

Quick Start

To create a JSON response, use the following code:

import { createJsonResponse } from "@jderjs/hono";

const route = (): Response => {
    return createJsonResponse();
}

And the response will be shown as below:

{
    "success": true
}

Documentation

For Hono, please refer to the Hono Documentation.

For Zod validator, please refer to the Zod Validator Documentation.

APIs

For Hono package APIs, please refer to the Hono APIs.

For Zod validator package APIs, please refer to the Zod Validator APIs.

License

This project is licensed under the terms of the MIT license.