All checks were successful
Queue Release Build / prepare (push) Successful in 15s
Deploy Web Apps / deploy (push) Successful in 5m35s
Queue Release Build / build-linux (push) Successful in 24m45s
Queue Release Build / build-windows (push) Successful in 13m52s
Queue Release Build / finalize (push) Successful in 23s
40 lines
1.5 KiB
Markdown
40 lines
1.5 KiB
Markdown
# Server
|
|
|
|
Node/TypeScript signaling server for MetoYou / Toju. This package owns the public server-directory API, join-request flows, websocket runtime, and server-side persistence.
|
|
|
|
## Install
|
|
|
|
1. Run `cd server`.
|
|
2. Run `npm install`.
|
|
|
|
## Commands
|
|
|
|
- `npm run dev` starts the server with `ts-node-dev` reload.
|
|
- `npm run build` compiles TypeScript to `dist/`.
|
|
- `npm run start` runs the compiled server.
|
|
- From the repository root, `npm run server:dev`, `npm run server:build`, and `npm run server:start` call the same package commands.
|
|
|
|
## Runtime Config
|
|
|
|
- The server loads the repository-root `.env` file on startup.
|
|
- `SSL` can override the effective HTTP protocol, and `PORT` can override the effective port.
|
|
- `data/variables.json` is normalized on startup and stores `klipyApiKey`, `releaseManifestUrl`, `serverPort`, `serverProtocol`, `serverHost`, and `linkPreview`.
|
|
- When HTTPS is enabled, certificates are read from the repository `.certs/` directory.
|
|
|
|
## Structure
|
|
|
|
| Path | Description |
|
|
| --- | --- |
|
|
| `src/index.ts` | Bootstrap and server startup |
|
|
| `src/app/` | Express app composition |
|
|
| `src/routes/` | REST API routes |
|
|
| `src/websocket/` | WebSocket runtime and signaling transport |
|
|
| `src/cqrs/` | Command/query handlers |
|
|
| `src/config/` | Runtime config loading and normalization |
|
|
| `src/db/`, `src/entities/`, `src/migrations/` | Persistence layer |
|
|
| `data/` | Runtime data files such as `variables.json` |
|
|
|
|
## Notes
|
|
|
|
- `dist/` and `../dist-server/` are generated output.
|
|
- See [AGENTS.md](AGENTS.md) for package-specific editing guidance. |