cabal-club / cabal-cli

Terminal client for Cabal, the p2p chat platform.

Home Page:https://cabal.chat

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add --ws option to launch web sockets server

cblgh opened this issue · comments

@nikolaiwarner's been working on splitting up https://github.com/cabal-club/cabal-desktop/ components so that they can be used in a browser-based cabal application. As far as I know, it currently uses a websocket server to relay messages. (A similar approach to what I've done in https://github.com/cblgh/cabal-crepes/tree/wip-wss)

Since we already use the cli client to seed cabal instances with cabal --seed, I thought it would be excellent to enable an easily launched web socket server in the background, too.

--ws could accept as its argument the port used to host the websocket server.

This would mean that any cabal-cli instance could also easily double as a web socket server for the first version of browser-based clients, afaik @perguth has, together with his company, been wanting a way to use Cabal in a browser without everyone participating needing to host all of the content, so this idea would enable that usecase.

I really love the idea of the cabal cli being so trivially multipurpose enough for this. 😎