open-index/open-npm huggingface dataset:
npm package: @hono/class-validator
Description: Validator middleware using class-validator
Latest version: 1.0.0

# Class-validator middleware for Hono

The validator middleware using [class-validator](https://github.com/typestack/class-validator) for [Hono](https://github.com/honojs/hono) applications.

## Usage

```ts
import { classValidator } from '@hono/class-validator'
import { IsInt, IsString } from 'class-validator'
 
class CreateUserDto {
  @IsString()
  name!: string;
 
  @IsInt()
  age!: number;
}
 
 
const route = app.post('/user', classValidator('json', CreateUserDto), (c) => {
  const user = c.req.valid('json')
  return c.json({ success: true, message: `${user.name} is ${user.age}` })
})
```

With hook:

```ts
import { classValidator } from '@hono/class-validator'
import { IsInt, IsString } from 'class-validator'

class CreateUserDto {
  @IsString()
  name!: string;

 @IsInt()
  age!: number;
}

app.post(
  '/user', classValidator('json', CreateUserDto, (result, c) => {
    if (!result.success) {
      return c.text('Invalid!', 400)
     }
  })
  //...
)
```

## Author

**Pr0m3ht3us** - https://github.com/pr0m3th3usex

## License

MIT
npm package: @hono/client
Description: HTTP Client for Hono
Author: Yusuke Wada
Latest version: 0.0.3
Deprecated: The client feature has been integrated into the Hono core. Please use hono/client instead.

# Hono Client

[![Version](https://img.shields.io/npm/v/@hono/client.svg)](https://npmjs.com/package/@hono/client)
[![Bundle Size](https://img.shields.io/bundlephobia/min/@hono/client)](https://bundlephobia.com/result?p=@hono/client)
[![Bundle Size](https://img.shields.io/bundlephobia/minzip/@hono/client)](https://bundlephobia.com/result?p=@hono/client)

Hono Client is HTTP Client based on Fetch API.
It's Type-Safe.
You can access to the Hono application ultra-easily.

```ts
import { Client } from '@hono/client'
import type { AppType } from './server'

const client = new Client<AppType>('http://localhost:8787/api')

const res = await client.post('/posts').json({
  id: 123,
  title: 'Hello Hono!',
  published: true,
})

const data = await res.json()
console.log(`${data.message}`)
```

## Features

- Small about 1.5kb
- TypeSafe
- Compatible with Fetch API
- Optimized for Hono v3.x

## Demo

![Demo](https://user-images.githubusercontent.com/10682/210117450-7ec4652f-ef7d-41a8-887c-427e33ab1963.gif)

## Install

```
npm i @hono/client
```

Or

```
yarn add @hono/client
```

## Examples

Server-side with [Zod](https://zod.dev).

```ts
import { Hono } from 'hono'
import { validator } from 'hono/validator'
import { z } from 'zod'

const api = new Hono()

const schema = z.object({
  id: z.number(),
  title: z.string(),
  published: z.boolean(),
})

const route = api
  .post(
    '/posts',
    validator('json', (value, c) => {
      const result = schema.safeParse(value)
      if (!result.success) {
        return c.text('Invalid!', 400)
      }
      return result.data
    }),
    (c) => {
      const { title, published } = c.req.valid()
      return c.jsonT({
        success: true,
        message: `"${title}" is ${published ? 'published' : 'not published'}`,
      })
    }
  )
  .build()

export type AppType = typeof route
```

## Author

Yusuke Wada <https://github.com/yusukebe>

## License

MIT
npm package: @hono/command
Description: A CLI command for Hono
Author: Yusuke Wada
Latest version: 0.0.1

# @hono/command

A CLI command for Hono

## Installation

```bash
npm install -g @hono/command
```

## Usage

```bash
# Show help
hono --help

# Say hello
hono hello

# Say hello to someone
hono hello yusuke
```

## Commands

- `hello [name]` - Say hello (default: Hono)

## Authors

- Yusuke Wada https://github.com/yusukebe
- Taku Amano https://github.com/usualoma

## License

MIT
npm package: @hono/conform-validator
Description: Validator middleware using Conform
Latest version: 1.0.0

# Conform validator middleware for Hono

The validator middleware using [conform](https://conform.guide) for [Hono](https://honojs.dev) applications. This middleware allows you to validate submitted FormValue and making better use of [Hono RPC](https://hono.dev/docs/guides/rpc).

## Usage

Zod:

```ts
import { z } from 'zod'
import { parseWithZod } from '@conform-to/zod'
import { conformValidator } from '@hono/conform-validator'
import { HTTPException } from 'hono/http-exception'

const schema = z.object({
  name: z.string(),
  age: z.string(),
})

app.post(
  '/author',
  conformValidator((formData) => parseWithZod(formData, { schema })),
  (c) => {
    const submission = c.req.valid('form')
    const data = submission.value

    return c.json({ success: true, message: `${data.name} is ${data.age}` })
  }
)
```

Yup:

```ts
import { object, string } from 'yup'
import { parseWithYup } from '@conform-to/yup'
import { conformValidator } from '@hono/conform-validator'
import { HTTPException } from 'hono/http-exception'

const schema = object({
  name: string(),
  age: string(),
})

app.post(
  '/author',
  conformValidator((formData) => parseWithYup(formData, { schema })),
  (c) => {
    const submission = c.req.valid('form')
    const data = submission.value
    return c.json({ success: true, message: `${data.name} is ${data.age}` })
  }
)
```

Valibot:

```ts
import { object, string } from 'valibot'
import { parseWithValibot } from 'conform-to-valibot'
import { conformValidator } from '@hono/conform-validator'
import { HTTPException } from 'hono/http-exception'

const schema = object({
  name: string(),
  age: string(),
})

app.post(
  '/author',
  conformValidator((formData) => parseWithYup(formData, { schema })),
  (c) => {
    const submission = c.req.valid('form')
    const data = submission.value
    return c.json({ success: true, message: `${data.name} is ${data.age}` })
  }
)
```

## Custom Hook Option

By default, `conformValidator()` returns a [`SubmissionResult`](https://github.com/edmundhung/conform/blob/6b98c077d757edd4846321678dfb6de283c177b1/packages/conform-dom/submission.ts#L40-L47) when a validation error occurs. If you wish to change this behavior, or if you wish to perform common processing, you can modify the response by passing a function as the second argument.

```ts
app.post(
  '/author',
  conformValidator(
    (formData) => parseWithYup(formData, { schema })
    (submission, c) => {
      if(submission.status !== 'success') {
        return c.json({ success: false, message: 'Bad Request' }, 400)
      }
    }
  ),
  (c) => {
    const submission = c.req.valid('form')
    const data = submission.value
    return c.json({ success: true, message: `${data.name} is ${data.age}` })
  }
)
```

> [!NOTE]
> if a response is returned by the Hook function, subsequent middleware or handler functions will not be executed. [see more](https://hono.dev/docs/concepts/middleware).

## Author

uttk <https://github.com/uttk>

## License

MIT
npm package: @hono/effect-validator
Description: Validator middleware using Effect Schema
Latest version: 1.2.0

# Effect Schema Validator Middleware for Hono

This package provides a validator middleware using [Effect Schema](https://github.com/Effect-TS/effect/blob/main/packages/schema/README.md) for [Hono](https://honojs.dev) applications. With this middleware, you can define schemas using Effect Schema and validate incoming data in your Hono routes.

## Why Effect Schema?

Effect Schema offers several advantages over other validation libraries:

1. Bidirectional transformations: Effect Schema can both decode and encode data.
2. Integration with Effect: It inherits benefits from the Effect ecosystem, such as dependency tracking in transformations.
3. Highly customizable: Users can attach meta-information through annotations.
4. Functional programming style: Uses combinators and transformations for schema definition.

## Usage

```ts
import { Hono } from 'hono'
import { Schema as S } from '@effect/schema'
import { effectValidator } from '@hono/effect-validator'

const app = new Hono()

const User = S.Struct({
  name: S.String,
  age: S.Number,
})

app.post('/user', effectValidator('json', User), (c) => {
  const user = c.req.valid('json')

  return c.json({
    success: true,
    message: `${user.name} is ${user.age}`,
  })
})
```

## API

### `effectValidator(target, schema)`

- `target`: The target of validation ('json', 'form', 'query', etc.)
- `schema`: An Effect Schema schema

## Author

Günther Brunner <https://github.com/gunta>

## License

MIT
npm package: @hono/hc
Description: TypeSafe HTTP Client for Hono
Author: Yusuke Wada
Latest version: 0.0.6
Deprecated: The client feature has been integrated into the Hono core. Please use hono/client instead.

# hc - TypeSafe HTTP Client for Hono

[![Version](https://img.shields.io/npm/v/@hono/hc.svg)](https://npmjs.com/package/@hono/hc)
[![Bundle Size](https://img.shields.io/bundlephobia/min/@hono/hc)](https://bundlephobia.com/result?p=@hono/hc)
[![Bundle Size](https://img.shields.io/bundlephobia/minzip/@hono/hc)](https://bundlephobia.com/result?p=@hono/hc)

hc is HTTP Client based on Fetch API.
It's Type-Safe. It's for Hono.
You can access to the Hono application safety and ultra-easily.

```ts
import { hc } from '@hono/hc'
import type { AppType } from './server'

const client = hc<AppType>('http://localhost:8787/api')

const res = await client.post('/posts').json({
  id: 123,
  title: 'Hello Hono!',
  published: true,
})

const data = await res.json()
console.log(`${data.message}`)
```

## Features

- Small about 1.5kb
- TypeSafe
- Compatible with Fetch API
- Optimized for Hono v3.x

## Demo

![Demo](https://user-images.githubusercontent.com/10682/210117450-7ec4652f-ef7d-41a8-887c-427e33ab1963.gif)

## Install

```
npm i @hono/hc
```

Or

```
yarn add @hono/hc
```

## Examples

Server-side with [Zod](https://zod.dev).

```ts
import { Hono } from 'hono'
import { validator } from 'hono/validator'
import { z } from 'zod'

const api = new Hono()

const schema = z.object({
  id: z.number(),
  title: z.string(),
  published: z.boolean(),
})

const route = api
  .post(
    '/posts',
    validator('json', (value, c) => {
      const result = schema.safeParse(value)
      if (!result.success) {
        return c.text('Invalid!', 400)
      }
      return result.data
    }),
    (c) => {
      const { title, published } = c.req.valid()
      return c.jsonT({
        success: true,
        message: `"${title}" is ${published ? 'published' : 'not published'}`,
      })
    }
  )
  .build()

export type AppType = typeof route
```

## Author

Yusuke Wada <https://github.com/yusukebe>

## License

MIT
npm package: @hono/qwik-city
Description: Qwik City middleware for Hono
Latest version: 0.0.5

# Qwik City middleware for Hono

**WIP**

## Usage

```ts
import { qwikMiddleware } from '@hono/qwik-city'
import qwikCityPlan from '@qwik-city-plan'
import render from './entry.ssr'
import { Hono } from 'hono'

const app = new Hono()

app.all('*', qwikMiddleware({ render, qwikCityPlan }))

export default app
```

## Author

Yusuke Wada <https://github.com/yusukebe>

## License

MIT
npm package: @hono/tsyringe
Description: The tsyringe dependency injection middleware for Hono
Latest version: 1.0.1

# tsyringe middleware for Hono

The [tsyringe](https://github.com/microsoft/tsyringe) middleware provides a way to use dependency injection in [Hono](https://hono.dev/).

## Usage

```ts
import "reflect-metadata" // tsyringe requires reflect-metadata or polyfill
import { container, inject, injectable } from 'tsyringe'
import { tsyringe } from '@hono/tsyringe'
import { Hono } from 'hono'

@injectable()
class Hello {
  constructor(@inject('name') private name: string) {}

  greet() {
    return `Hello, ${this.name}!`
  }
}

const app = new Hono()

app.use('*', tsyringe((container) => {
    container.register('name', { useValue: 'world' })
}))

app.get('/', (c) => {
    const hello = container.resolve(Hello)
    return c.text(hello.greet())
})

export default app
```

### With providers

```ts
const app = new Hono()

app.use('/tenant/:name/*', async (c, next) => {
    await tsyringe((container) => {
        // Allowing to inject `c.var` or `c.req.param` in the providers
        const tenantName = c.req.param('name')

        container.register(Config, { useFactory: () => new Config(tenantName) })
    })(c, next)
})
```

## Author

Aotokitsuruya <https://github.com/elct9620>

## License

MIT
npm package: @hono/typia-validator
Description: Validator middleware using Typia
Latest version: 0.1.2

# Typia validator middleware for Hono

[![codecov](https://codecov.io/github/honojs/middleware/graph/badge.svg?flag=typia-validator)](https://codecov.io/github/honojs/middleware)

The validator middleware using [Typia](https://typia.io/docs/) for [Hono](https://honojs.dev) applications.

## Usage

You can use [Basic Validation](#basic-validation) and [HTTP Module Validation](#http-module-validation) with Typia Validator.

### Basic Validation

Use only the standard validator in typia.

```ts
import typia, { tags } from 'typia'
import { typiaValidator } from '@hono/typia-validator'

interface Author {
  name: string
  age: number & tags.Type<'uint32'> & tags.Minimum<20> & tags.ExclusiveMaximum<100>
}

const validate = typia.createValidate<Author>()

const route = app.post('/author', typiaValidator('json', validate), (c) => {
  const data = c.req.valid('json')
  return c.json({
    success: true,
    message: `${data.name} is ${data.age}`,
  })
})
```

Hook:

```ts
app.post(
  '/post',
  typiaValidator('json', validate, (result, c) => {
    if (!result.success) {
      return c.text('Invalid!', 400)
    }
  })
  //...
)
```

### HTTP Module Validation

[Typia's HTTP module](https://typia.io/docs/misc/#http-module) allows you to validate query and header parameters with automatic type parsing.

- **Supported Parsers:** The HTTP module currently supports "query" and "header" validations.
- **Parsing Differences:** The parsing mechanism differs slightly from Hono's native parsers. Ensure that your type definitions comply with Typia's HTTP module restrictions.

```typescript
import { Hono } from 'hono'
import typia from 'typia'
import { typiaValidator } from '@hono/typia-validator/http'

interface Author {
  name: string
  age: number & tags.Type<'uint32'> & tags.Minimum<20> & tags.ExclusiveMaximum<100>
}

interface IQuery {
  limit?: number
  enforce: boolean
  values?: string[]
  atomic: string | null
  indexes: number[]
}
interface IHeaders {
  'x-category': 'x' | 'y' | 'z'
  'x-memo'?: string
  'x-name'?: string
  'x-values': number[]
  'x-flags': boolean[]
  'x-descriptions': string[]
}

const app = new Hono()

const validate = typia.createValidate<Author>()
const validateQuery = typia.http.createValidateQuery<IQuery>()
const validateHeaders = typia.http.createValidateHeaders<IHeaders>()

app.get(
  '/items',
  typiaValidator('json', validate),
  typiaValidator('query', validateQuery),
  typiaValidator('header', validateHeaders),
  (c) => {
    const query = c.req.valid('query')
    const headers = c.req.valid('header')
    return c.json({
      success: true,
      query,
      headers,
    })
  }
)
```

## Author

Patryk Dwórznik <https://github.com/dworznik>

## License

MIT
npm package: @honocorporation/countrycodes
Description: ISO2 and IS03 country codes and related entities
Author: Alois Odhiambo
Latest version: 3.0.0

# @honocorporation/countrycodes  

![npm (scoped)](https://img.shields.io/npm/v/@honocorporation/countrycodes)
![npm bundle size (scoped)](https://img.shields.io/bundlephobia/min/@honocorporation/countrycodes)  

This package contains data on both ISO2 and IS03 country codes and related data such as continents, dialing codes, flags and currencies

## Install  
```shell  
npm install @honocorporation/countrycodes  
```

## Usage  
Import desired entities using JavaScript ES6 module syntax.  
For example:  
```javascript  
import {CountryCodes} from "./node_modules/@honocorporation/countrycodes/index.js";

console.log(CountryCodes);   
```
npm package: @honohub/graphql
Description: The `useGraphQL` plugin adds the GraphQL endpoint to the Hono App. You can also enable the GraphQL playground using the `playground` prop. {{ className: 'lead' }}
Latest version: 0.2.4

# @honohub/graphql

The `useGraphQL` plugin adds the GraphQL endpoint to the Hono App. You can also enable the GraphQL playground using the `playground` prop. {{ className: 'lead' }}

Here's an example of how to use the `useGraphQL` plugin -

```ts
export default defineHub({
  db,
  serverUrl: "http://localhost:3000/",
  collections: [collection],
  plugins: [
    useGraphQL({
      route: "/graphql",
      playground: true,
    }),
  ],
});
```
npm package: @honohub/react
Description: React admin panel for honohub
Latest version: 0.2.0

# @honohub/react

The `@honohub/react` package is built using [React](https://react.dev), [Tailwind CSS](https://tailwindcss.com), [React Router](https://reactrouter.com/en/main), [Rafty UI](https://rafty.rhinobase.io), [React Query](https://tanstack.com/query/latest) and other utility packages to render the Admin Panel. This package is a component library which can be used to render the Admin Panel in your React app. That means you can also use the components from this package to build your own Admin Panel in your React or Nextjs app, while serving the APIs from your Hono App.
npm package: @honohub/shared
Description: HonoHub shared components
Latest version: 0.3.2

<a href="https://honohub.dev"><img width="100%" src="https://github.com/rhinobase/honohub/blob/main/apps/docs/public/images/banner.png?raw=true" alt="HonoHub Open-source headless CMS on the Edge" /></a>
<br />

<div align="center">

[![npm version](https://img.shields.io/npm/v/honohub.svg)](https://npmjs.org/package/honohub "View this project on NPM")
[![npm downloads](https://img.shields.io/npm/dm/honohub)](https://www.npmjs.com/package/honohub)
[![license](https://img.shields.io/npm/l/honohub)](LICENSE)

A CMS framework built on [Hono](https://hono.dev/), [Drizzle](https://orm.drizzle.team/), [Zod](https://zod.dev/), and [Vite](https://vitejs.dev/)

</div>

**HonoHub** is a simple and fast middleware for creating CMS for your websites or Apps.

> [!NOTE]  
> HonoHub is currently in the "alpha stage". Breaking changes are introduced without following semantic versioning.

## Quickstart

```sh
# Using npm/yarn/pnpm/bun
npm add honohub
```

[Go here for a step-by-step guide](https://honohub.dev/quickstart) on how to get up and running.

Check out the [docs](https://honohub.dev) and [plugins](https://honohub.dev/plugins/graphql) and start building.

## Plugins

| Name                                                                 | Description                                                       |
| -------------------------------------------------------------------- | ----------------------------------------------------------------- |
| [`@honohub/graphql`](https://www.npmjs.com/package/@honohub/graphql) | The `useGraphQL` plugin adds the GraphQL endpoint and playground. |

## Troubleshooting

If the suggestions here don't work, please try posting questions on [GitHub Discussions](https://github.com/rhinobase/honohub/discussions) or in the #help channel of [Hono Discord](https://discord.gg/xUtamz2vxH).

## Contributing

We would love to have more contributors involved!

To get started, please read our [Contributing Guide](https://github.com/rhinobase/honohub/blob/main/CONTRIBUTING.md).

## Disclaimer

HonoHub is not affiliated with [Hono](https://hono.dev/), [Drizzle](https://orm.drizzle.team/), [Zod](https://zod.dev/), or [Vite](https://vitejs.dev/). HonoHub is an independent project developed by [Rhinobase](https://rhinobase.com/).

## Credits

The `honohub` project's UI is inspired by [Nuxt Devtools](https://github.com/nuxt/devtools) and [Strapi](https://github.com/strapi/strapi).
npm package: @honohub/storage
Description: HonoHub storage components
Latest version: 0.1.2

<a href="https://honohub.dev"><img width="100%" src="https://github.com/rhinobase/honohub/blob/main/apps/docs/public/images/banner.png?raw=true" alt="HonoHub Open-source headless CMS on the Edge" /></a>
<br />

<div align="center">

[![npm version](https://img.shields.io/npm/v/honohub.svg)](https://npmjs.org/package/honohub "View this project on NPM")
[![npm downloads](https://img.shields.io/npm/dm/honohub)](https://www.npmjs.com/package/honohub)
[![license](https://img.shields.io/npm/l/honohub)](LICENSE)

A CMS framework built on [Hono](https://hono.dev/), [Drizzle](https://orm.drizzle.team/), [Zod](https://zod.dev/), and [Vite](https://vitejs.dev/)

</div>

**HonoHub** is a simple and fast middleware for creating CMS for your websites or Apps.

> [!NOTE]  
> HonoHub is currently in the "alpha stage". Breaking changes are introduced without following semantic versioning.

## Quickstart

```sh
# Using npm/yarn/pnpm/bun
npm add honohub
```

[Go here for a step-by-step guide](https://honohub.dev/quickstart) on how to get up and running.

Check out the [docs](https://honohub.dev) and [plugins](https://honohub.dev/plugins/graphql) and start building.

## Plugins

| Name                                                                 | Description                                                       |
| -------------------------------------------------------------------- | ----------------------------------------------------------------- |
| [`@honohub/graphql`](https://www.npmjs.com/package/@honohub/graphql) | The `useGraphQL` plugin adds the GraphQL endpoint and playground. |

## Troubleshooting

If the suggestions here don't work, please try posting questions on [GitHub Discussions](https://github.com/rhinobase/honohub/discussions) or in the #help channel of [Hono Discord](https://discord.gg/xUtamz2vxH).

## Contributing

We would love to have more contributors involved!

To get started, please read our [Contributing Guide](https://github.com/rhinobase/honohub/blob/main/CONTRIBUTING.md).

## Disclaimer

HonoHub is not affiliated with [Hono](https://hono.dev/), [Drizzle](https://orm.drizzle.team/), [Zod](https://zod.dev/), or [Vite](https://vitejs.dev/). HonoHub is an independent project developed by [Rhinobase](https://rhinobase.com/).

## Credits

The `honohub` project's UI is inspired by [Nuxt Devtools](https://github.com/nuxt/devtools) and [Strapi](https://github.com/strapi/strapi).
npm package: @honohub/vite
Description: Vite plugin for honohub
Latest version: 0.1.11

# @honohub/vite

The `@honohub/vite` plugin is a Vite plugin which adds the HonoHub configurations to the Vite server, enabling the Vite server to serve the Admin Panel. Here is an example of how to use the `@honohub/vite` plugin -

```ts
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
import honohub from "@honohub/vite";
import hubConfig from "./hub.config";

export default defineConfig({
  plugins: [
    react(),
    honohub({
      config: hubConfig, // Your hub configuration
      basePath: "/", // Base path for the admin panel
    }),
  ],
});
```

This will add the HonoHub configurations to the Vite server and serve the Admin Panel at the base path `/`. You can customize the base path and the hub configuration as per your requirements. Out of the box the `@honohub/vite` plugin uses the `@honohub/react` plugin to render the Admin Panel but you can use your own plugin to render the Admin Panel using the `generator` option.
npm package: @honojs/graphql-server
Description: ## Information
Author: Minghe Huang
Latest version: 0.1.2
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# GraphQL Server Middleware

## Information

GraphQL Server Middleware `@honojs/graphql-server` is renamed to `@hono/graphql-server`.
`@honojs/graphql-server` is not maintained, please use `@hono/graphql-server`.
Also, for Deno, you can use import with `npm:` prefix like `npm:@hono/graphql-server`.

## Requirements

This middleware depends on [GraphQL.js](https://www.npmjs.com/package/graphql).

```sh
npm i @hono/graphql-server
```

or

```plain
yarn add @hono/graphql-server
```

## Usage

index.js:

```js
import { Hono } from 'hono'
import { graphqlServer } from '@hono/graphql-server'
import { buildSchema } from 'graphql'

export const app = new Hono()

const schema = buildSchema(`
type Query {
  hello: String
}
`)

const rootResolver = (ctx) => {
  return {
    hello: () => 'Hello Hono!',
  }
}

app.use(
  '/graphql',
  graphqlServer({
    schema,
    rootResolver,
  })
)

app.fire()
```
npm package: @honojs/hello
Description: An example of third-party middleware for Hono
Latest version: 0.0.7
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# Hello middleware for Hono

An example project of the third-party middleware for [Hono](https://github.com/honojs/hono).
This middleware add `X-Message` header to the Response.

## Usage

```ts
import { hello } from '@honojs/hello'
import { Hono } from 'hono'

const app = new Hono()

app.use('*', hello('Hello!! Hono!!'))
app.get('/', (c) => c.text('foo'))

export default app
```

## Author

Yusuke Wada <https://github.com/yusukebe>

## License

MIT
npm package: @honojs/node-server
Description: HTTP Server for Hono on Node.js
Author: Yusuke Wada
Latest version: 0.1.3
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# Hono on Node.js

**This project is still experimental.**

This is **HTTP Server for Hono on Node.js**.
Hono is ultrafast web framework for Cloudflare Workers, Deno, and Bun.
**It's not for Node.js**.
**BUT**, there may be a case that you really want to run on Node.js. This library is an adapter server that connects Hono and Node.js.

Hono is ultra fast, but not so fast on Node.js, because there is an overhead to adapt Hono's API to Node.js.

By the way, it is 2.x times faster than Express.

## Install

You can install from npm registry with `npm` command:

```
npm install @honojs/node-server
```

Or use `yarn`:

```
yarn add @honojs/node-server
```

## Usage

Just import `@honojs/node-server` at the top and write the code as usual.
The same code that runs on Cloudflare Workers, Deno, and Bun will work.

```ts
import { serve } from '@honojs/node-server' // Write above `Hono`
import { Hono } from 'hono'

const app = new Hono()
app.get('/', (c) => c.text('Hono meets Node.js'))

serve(app)
```

For example, run it using `ts-node`. Then an HTTP server will be launched. The default port is `3000`.

```
ts-node ./index.ts
```

Open `http://localhost:3000` with your browser.

## Options

```ts
serve({
  fetch: app.fetch,
  port: 8787, // Port number, default is 3000
})
```

## Middleware

Most built-in middleware also works with Node.js.
Read [the documentation](https://honojs.dev/docs/builtin-middleware/) and use the Middleware of your liking.

```ts
import { serve } from '@honojs/node-server'
import { Hono } from 'hono'
import { prettyJSON } from 'hono/pretty-json'

const app = new Hono()

app.get('*', prettyJSON())
app.get('/', (c) => c.json({ 'Hono meets': 'Node.js' }))

serve(app)
```

### Serve Static Middleware

Use Serve Static Middleware that has been created for Node.js.

```ts
import { serve, serveStatic } from '@honojs/node-server'

//...

app.use('/static/*', serveStatic({ root: './' }))
```

## Related projects

- Hono - <https://honojs.dev>
- Hono GitHub repository - <https://github.com/honojs/hono>

## Author

Yusuke Wada <https://github.com/yusukebe>

## License

MIT
npm package: @honojs/sentry
Description: Sentry Middleware for Hono
Author: Samuel Lippert
Latest version: 0.0.6
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# Sentry middleware for Hono

## Information

Sentry Middleware `@honojs/sentry` is renamed to `@hono/sentry`.
`@honojs/sentry` is not maintained, please use `@hono/sentry`.
Also, for Deno, you can use import with `npm:` prefix like `npm:@hono/sentry`.

---

Sentry middleware for [Hono](https://github.com/honojs/hono).
This middleware sends captured exceptions to the specified Sentry data source name via [toucan-js](https://github.com/robertcepa/toucan-js).

## Usage

```ts
import { sentry } from '@hono/sentry'
import { Hono } from 'hono'

const app = new Hono()

app.use('*', sentry())
app.get('/', (c) => c.text('foo'))

export default app
```

## Deno

```ts
import { serve } from 'https://deno.land/std/http/server.ts'
import { sentry } from 'npm:@hono/sentry'
import { Hono } from 'https://deno.land/x/hono/mod.ts'

const app = new Hono()

app.use('*', sentry({ dsn: 'https://xxxxxx@xxx.ingest.sentry.io/xxxxxx' }))
app.get('/', (c) => c.text('foo'))

serve(app.fetch)
```

## Author

Samuel Lippert <https://github.com/sam-lippert>

## License

MIT
npm package: @honor-minigame/cli
Description: honor minigame pack cli
Author: honor
Latest version: 1.1.4

# @honor-minigame/cli


## 安装

全局安装@honor-minigame/cli后，可以使用minigame命令，安装命令如下：

```
npm install -g @honor-minigame/cli
```
安装完成后，可以使用 minigame -V 查看版本号

## 使用

```
构建debug包
minigame pack 

构建release包
minigame pack release
```

### 构建egret包
```
minigame egret 
```