Skip to content
Open
Show file tree
Hide file tree
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
12 changes: 12 additions & 0 deletions packages/document/docs/en/guides/advanced-features/web-server.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,18 @@ export default defineServerConfig({

After creating the file, you can write custom logic in this file.

3. Include `server` directory in `tsconfig.json`

```json5
{
// ...
"include": [
// ...
"server"
]
}
```

## Capabilities of the Custom Web Server

Modern.js's Web Server is based on Hono, and in the latest version of the Custom Web Server, we expose Hono's middleware capabilities, you can refer to [Hono API](https://hono.dev/docs/api/context) for more usage.
Expand Down
2 changes: 1 addition & 1 deletion packages/toolkit/create/template/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"@shared/*": ["./shared/*"]
}
},
"include": ["src", "shared", "config", "modern.config.ts"],
"include": ["src", "shared", "config", "modern.config.ts", "server"],
"exclude": ["**/node_modules"]
}