import { Meta } from '@storybook/addon-docs/blocks'

<Meta title='@dxtmisha/en/nitro-basic/Functions/initServerRouter - Server Router Initialization'/>

# `initServerRouter`

An asynchronous function to initialize the Vue router during server-side rendering. It pushes the router to the current request URL and waits for it to be ready.

**Parameters:**
- `request: Request` — The HTTP request object.
- `router: Router | undefined` — The Vue Router instance.

**Returns:**
`Promise<void>`

```typescript
import { initServerRouter } from '@dxtmisha/nitro-basic'

await initServerRouter(request, router)
```
