@bsgbryan/jyn
v2026.6.3
Published
A simple, async, multithreaded web socket & http Mädūl server
Downloads
1,091
Maintainers
Readme
Jyn
A simple, fun, fully asynchronous web socket & http server
Install
curl -fsSL https://bun.com/install | bash # install bun
bun i -g @bsgbryan/jyn # install jyn globallyUsage
jyn # run jynThat's it. Really.
For command options, execute jyn --help
Handling requests
jyn is built on Mädūl. It bootstraps and invokes the madul specified by the madul property of the JSON web socket request, executes the default export, and returns the results.
What does this look like in practice?
bun init jyn_test- Add
"paths": { "+*": ["./*"] }to the end of thecompilerOptionssection of the newly-createdjyn_test/tsconfig.json bun i -g wscatjynecho 'export default ({ message: { name }, session_id }) => postMessage({content: `Hello ${name}!`, session_id, format: "TEXT"})\n' > ./greet.tswscat -c ws://localhost:1138{"madul": "+greet", "content": {"name": "World"}}
Which produces the response {"format":"TEXT","content":"Hello World!"}
Why Bun?
Because it's awesome. It's super-fast, fun to work with, and comes with a ton of great tooling out-of-the-box.
Would you like to know more?
