Note:
HeliumTS is under active development. Expect bugs and breaking changes. If you find any issues, please report them in our GitHub
A stable release is planned for early 2026.
Configuration
Helium's configuration file allows you to customize server settings including RPC encoding, compression, security, and proxy configuration.
helium.config.ts
1import type { HeliumConfig } from "heliumts/server";23const config: HeliumConfig = {4 // Trust 1 proxy level (e.g., Vercel)5 trustProxyDepth: 1,67 rpc: {8 // Transport mode: "websocket" | "http" | "auto"9 transport: "websocket", // default1011 // Auto-switch to HTTP on mobile/cellular networks12 autoHttpOnMobile: false, // default1314 // Compression settings15 compression: {16 enabled: true,17 threshold: 1024,18 },1920 // Security settings21 security: {22 maxConnectionsPerIP: 10,23 maxMessagesPerWindow: 100,24 rateLimitWindowMs: 60000,25 tokenValidityMs: 30000,26 },2728 // Payload limits29 maxWsPayload: 10_485_760, // 10 MB30 maxBodySize: 10_485_760, // 10 MB31 maxBatchSize: 50,32 },33};3435export default config;