<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [server](./server.md) &gt; [startServer](./server.startserver.md)

## startServer() function

The entry point for running game setup and starting the game server.

**Signature:**

```typescript
export declare function startServer(init: (world: World) => void): void;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

init


</td><td>

(world: [World](./server.world.md)<!-- -->) =&gt; void


</td><td>

A function that initializes the world.


</td></tr>
</tbody></table>
**Returns:**

void

## Remarks

This function should always be called first when initializing your game. It will internally handle initialization of the physics engine and other systems required systems. All of your game setup logic should be executed in the init function.

