Slot Engine is in Beta - Stable, but may contain minor bugs
Slot EngineSlot Engine

Overview

Learn the key components to setting up Panel.


Setting up Panel

Create a Panel by calling createPanel() and passing a configuration object.

index.ts
import { createPanel } from "@slot-engine/panel"
import { game as MyGame } from "../../path-to/my-game"

const panel = createPanel({
  games: [MyGame],
})

panel.start()

createPanel() Options

PropertyTypeDescriptionRequired
gamesSlotGame[]A list of connected games.yes
lgsEngineLgsA local gaming server, served on the panel port. See Attach an LGS.

Attach an LGS

Pass an LGS from @slot-engine/lgs to serve it on the panel port next to the panel. The panel registers its games with the LGS and announces it at startup.

index.ts
import { EngineLgs, InMemoryStorage } from "@slot-engine/lgs"
import { createPanel } from "@slot-engine/panel"
import { game as MyGame } from "../../path-to/my-game"

const panel = createPanel({
  games: [MyGame],
  lgs: new EngineLgs({ storage: new InMemoryStorage() }),
})

panel.start()
⚡️ Slot Engine Panel is running on http://localhost:7770
:: 1 games loaded
:: LGS "Engine" attached, rgs_url=localhost:7770

Do not set port on an LGS that you pass to the panel. createPanel() throws when the LGS has one. Sessions are created through POST http://localhost:7770/lgs/sessions, see Sessions.

Use of AI on this page: Some texts were improved with or written by AI.

On this page