# Function: serveNode()

```ts
function serveNode(node, port): () => void;
```

Defined in: [packages/core/src/node/remote.ts:59](https://github.com/leifriksheim/minca/blob/main/core/src/node/remote.ts#L59)

Answers for `node` over `port`, until the returned function is called.
Stopping leaves the node running: closing it is its owner's to do, or the
other side's, through `close()`.

## Parameters

| Parameter | Type |
| ------ | ------ |
| `node` | [`P2PNode`](https://minca.dev/api/core/interfaces/P2PNode.md) |
| `port` | [`MessagePortLike`](https://minca.dev/api/core/interfaces/MessagePortLike.md) |

## Returns

() => `void`
