
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
@bit-js/bun-ws
Advanced tools
bun-ws
A simple WebSocket router for Bun.
Route file:
import { route } from '@bit-js/bun-ws';
export default route<{ id: string }>({
message(ws) {
ws.send(ws.data.id);
}
});
Use with a fetch handler.
import route from './route';
export default function fetch(req: Request) {
route.upgrade(req, {
data: { id: performance.now().toString() }
});
}
Entry point:
import fetch from './fetch';
import { serve } from '@bit-js/bun-ws';
// Create a server and bind all registered routes to that server
const server = serve({
// Bun server options
server: { fetch },
// WebSocket base handler options (without handlers)
ws: { publishToSelf: true }
});
Use bind
if you already have a server instance not created using serve
:
import { bind } from '@bit-js/bun-ws';
// Bind all registered routes to a server
bind(server);
FAQs
A simple WebSocket router for Bun.
The npm package @bit-js/bun-ws receives a total of 0 weekly downloads. As such, @bit-js/bun-ws popularity was classified as not popular.
We found that @bit-js/bun-ws demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.