Skip to content

Commit

Permalink
feat: enable dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
fzhange committed Feb 19, 2024
1 parent 31c572c commit f2e465b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export default defineConfig({
description: "一个高效、可伸缩、可信赖的、渐进式NodeJs框架",
ignoreDeadLinks: true,
base:"/nestJs-docs/",
appearance:"dark",
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [
Expand Down
22 changes: 22 additions & 0 deletions overview/controller.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,25 @@ findOne(@Param('id') id: string): string {
}

```

## Sub-Domain Routing

`@Controller`可以设置一个host参数来要求客户端请求所携带的host和具体的值匹配。

```js
@Controller({ host: 'admin.example.com' })
export class AdminController {
@Get()
index(): string {
return 'Admin page';
}
}
```

:::warning
Since Fastify lacks support for nested routers, when using sub-domain routing, the (default) Express adapter should be used instead.
:::

## Scopes

对于来自不同编程语言背景的人而言,在Nest中可能有一些意外。Nest中所有的东西都是在incoming requests中被共享的。

0 comments on commit f2e465b

Please sign in to comment.