Menu

Post image 1
Post image 2
1 / 2
0

Hedystia 2.3: Universal WebSocket, Native Node.js, PostgreSQL, and 20+ New Validations

DEV Community·Zastinian·23 days ago
#5dExPfmH
Reading 0:00
15s threshold

Native Node.js Support The HTTP layer now runs natively on Node.js — no adapter required. listen(port) works the same on Bun and Node. Before: import { adapter } from " @hedystia/adapter " ; import { createServer } from " node:http " ; const app = new Framework (). get ( " / " , () => " ok " ); createServer ( adapter ( app ). toNodeHandler ()). listen ( 3000 ); Enter fullscreen mode Exit fullscreen mode After: import Framework from " hedystia " ; new Framework (). get ( " / " , () => " ok " ). listen ( 3000 ); Enter fullscreen mode Exit fullscreen mode @hedystia/ws — Universal WebSocket A new package that works identically across Bun, Node.js, and Deno. Topic-based pub/sub, runtime-aware client, portable server that plugs into any HTTP runtime. import { WebSocketServer } from " @hedystia/ws/server " ; import { createWebSocket } from " @hedystia/ws/client " ; Enter fullscreen mode Exit fullscreen mode PostgreSQL Driver for @hedystia/db Native PostgreSQL support via the pg package.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More