# [API](/api/) › @qwik.dev/qwik-router/middleware/node

## createQwikCity

> Warning: This API is now obsolete.
>
> Use `createQwikRouter` instead. Will be removed in V3

```typescript
createQwikCity: typeof createQwikRouter;
```

[Edit this section](https://github.com/QwikDev/qwik/tree/main/packages/qwik-router/src/middleware/node/index.ts)

## createQwikRouter

```typescript
export declare function createQwikRouter(
  opts: QwikRouterNodeRequestOptions | QwikCityNodeRequestOptions,
): QwikRouterNodeMiddleware;
```

| Parameter | Type | Description |
| --- | --- | --- |
| opts | [QwikRouterNodeRequestOptions](#qwikrouternoderequestoptions) \\| [QwikCityNodeRequestOptions](#qwikcitynoderequestoptions) |  |

**Returns:**

[QwikRouterNodeMiddleware](#qwikrouternodemiddleware)

[Edit this section](https://github.com/QwikDev/qwik/tree/main/packages/qwik-router/src/middleware/node/index.ts)

## NodeRequestNextFunction

```typescript
export interface NodeRequestNextFunction
```

[Edit this section](https://github.com/QwikDev/qwik/tree/main/packages/qwik-router/src/middleware/node/index.ts)

## PlatformNode

```typescript
export interface PlatformNode
```

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| incomingMessage? |  | IncomingMessage \\| Http2ServerRequest | _(Optional)_ |
| node? |  | string | _(Optional)_ |
| ssr? |  | true | _(Optional)_ |

[Edit this section](https://github.com/QwikDev/qwik/tree/main/packages/qwik-router/src/middleware/node/index.ts)

## QwikCityNodeRequestOptions

> Warning: This API is now obsolete.
>
> Use `QwikRouterNodeRequestOptions` instead. Will be removed in V3

```typescript
export type QwikCityNodeRequestOptions = QwikRouterNodeRequestOptions;
```

**References:** [QwikRouterNodeRequestOptions](#qwikrouternoderequestoptions)

[Edit this section](https://github.com/QwikDev/qwik/tree/main/packages/qwik-router/src/middleware/node/index.ts)

## QwikRouterNodeMiddleware

```typescript
export interface QwikRouterNodeMiddleware
```

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| notFound |  | (req: IncomingMessage \\| Http2ServerRequest, res: ServerResponse, next: (e: any) => void) => Promise<void> |  |
| router |  | (req: IncomingMessage \\| Http2ServerRequest, res: ServerResponse, next: [NodeRequestNextFunction](#noderequestnextfunction), limits?: [QwikRouterNodeRequestLimits](#qwikrouternoderequestlimits)) => Promise<void> |  |
| staticFile |  | (req: IncomingMessage \\| Http2ServerRequest, res: ServerResponse, next: (e?: any) => void) => Promise<void> |  |

[Edit this section](https://github.com/QwikDev/qwik/tree/main/packages/qwik-router/src/middleware/node/index.ts)

## QwikRouterNodeRequestLimits

```typescript
export interface QwikRouterNodeRequestLimits
```

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| bodyLimit? |  | number | _(Optional)_ Maximum request body size in bytes imposed by the host. |

[Edit this section](https://github.com/QwikDev/qwik/tree/main/packages/qwik-router/src/middleware/node/index.ts)

## QwikRouterNodeRequestOptions

```typescript
export interface QwikRouterNodeRequestOptions extends ServerRenderOptions
```

**Extends:** ServerRenderOptions

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| getClientConn? |  | (req: IncomingMessage \\| Http2ServerRequest) => ClientConn | _(Optional)_ Provide a function that returns a `ClientConn` for the given request. |
| getOrigin? |  | (req: IncomingMessage \\| Http2ServerRequest) => string \\| null | _(Optional)_ Provide a function that computes the origin of the server, used to resolve relative URLs and validate the request origin against CSRF attacks. When not specified, it defaults to the `ORIGIN` environment variable (if set). If `ORIGIN` is not set, it's derived from the incoming request, which is not recommended for production use. You can specify the `PROTOCOL_HEADER`, `HOST_HEADER` to `X-Forwarded-Proto` and `X-Forwarded-Host` respectively to override the default behavior. |
| origin? |  | string | _(Optional)_ |
| requestBodyLimit? |  | number | _(Optional)_ Maximum request body size in bytes. Defaults to 10 MiB. |
| static? |  | \{ root?: string; cacheControl?: string; } | _(Optional)_ Options for serving static files |

[Edit this section](https://github.com/QwikDev/qwik/tree/main/packages/qwik-router/src/middleware/node/index.ts)
