1.3 KiB
1.3 KiB
Server Guidelines
This directory contains the Node/TypeScript signaling server, server-directory API, and websocket runtime.
Workflow
- Use
cd server && npm run dev,cd server && npm run build, andcd server && npm run start, or the root aliasesnpm run server:devandnpm run server:build. - Start tracing behavior from
src/index.ts, then follow intosrc/app/,src/websocket/, and the config or CQRS modules involved. - See
../doc/typescript.mdfor shared TypeScript rules.
Boundaries
- Keep bootstrap concerns in
src/index.tssmall and move request, websocket, or data behavior into focused modules. - Keep configuration and runtime path handling separate from transport or business logic.
- Prefer explicit modules for HTTP, websocket, database, and configuration responsibilities instead of growing god files.
Config And Output
- Server runtime config comes from the repository root
.envandserver/data/variables.json. - If
serverProtocolishttps, certificate files must exist before startup. - Treat
server/dist/and bundled output underdist-server/as generated.
Before You Finish
- Validate whether relevant markdown docs or
AGENTS.mdfiles need updates. If behavior, workflows, commands, or architecture changed, update those docs in the same task.