Skip to content

Commit

Permalink
docs(readme): update (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
yusukebe committed Apr 11, 2024
1 parent 5fbe0b3 commit 108678f
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ Essentially, you can simply use the latest version of each major release.

## Installation

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

```
```sh
npm install @hono/node-server
```

Or use `yarn`:

```
```sh
yarn add @hono/node-server
```

Expand All @@ -79,7 +79,7 @@ serve(app, (info) => {

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

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

Expand Down Expand Up @@ -114,6 +114,17 @@ serve({
})
```

### `overrideGlobalObjects`

The default value is `true`. The Node.js Adapter rewrites the global Request/Response and uses a lightweight Request/Response to improve performance. If you don't want to do that, set `false`.

```ts
serve({
fetch: app.fetch,
overrideGlobalObjects: false,
})
```

## Middleware

Most built-in middleware also works with Node.js.
Expand Down

0 comments on commit 108678f

Please sign in to comment.