Configuration
The driver readsconfig.json from the application root:
- Bundled executable: next to
plato-printer.exe. - Development: current working directory.
config.json is missing, the driver creates one with sanitized defaults.
Example Config
Server
| Field | Default | Notes |
|---|---|---|
server.port | 8080 | HTTP port for all API endpoints. |
Access-Control-Allow-Private-Network: true so browser POS clients can call the driver from local/private networks.
Features
| Field | Default | Notes |
|---|---|---|
features.meshEnabled | true | Enables PeerJS signaling on /mesh. |
features.httpsEnabled | true | Allows HTTPS setup when Caddy is also enabled. |
features.httpsEnabled and caddy.enabled are true.
Caddy
| Field | Default | Notes |
|---|---|---|
caddy.enabled | true | Enables the Caddy reverse proxy path. |
caddy.domain | plato-printer.local | Hostname used for HTTPS. |
caddy.httpsPort | 443 | HTTPS listener port. |
caddy.version | 2.6.4 | Pinned for Windows 7 compatibility. |
2.6.4.
Redis
| Field | Default | Notes |
|---|---|---|
redis.mode | embedded | embedded starts Redis from the driver; external uses an existing Redis server. |
redis.version | 6.2.14 | Required embedded Redis version. |
redis.host | 127.0.0.1 | Redis bind/connect host. |
redis.port | 6379 | Redis port. |
redis.db | 0 | Redis database number. |
redis.username | empty | Used for external Redis auth when set. |
redis.password | empty | Used for external Redis auth when set. |
redis.diskSync | false generated default | Writes Redis snapshots to dump.rdb when true. The committed production config sets this to true. |
redis.snapshotIntervalSec | 30 | Snapshot interval used when disk sync is enabled. |
redis.version.
Queue
| Field | Default | Notes |
|---|---|---|
queue.retryDelayMs | 5000 | Fixed retry backoff for failed print jobs. |
queue.maxAttempts | 2147483647 | Maximum attempts per job. The current config effectively retries forever. |
Sanitization
The config reader sanitizes values:- Ports and numeric settings must be positive integers.
- Booleans can be booleans or strings
"true"/"false". redis.modemust beembeddedorexternal.- Empty strings fall back to defaults for domain/version/host-like fields.