Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(readme): update #157

Merged
merged 1 commit into from
Apr 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading