I've merged the soju sections into a single paragraph. One thing to
notice, is that I don't really know if when running soju in a production
environment, you'll not need to set the `http-origin` directive. I wrote
it like that, as you haven't specified that before and I've only
encountered this problem when running locally. Let me know if it need
README.md | 29 +++++++++++++++++++++--------
1 file changed, 21 insertions(+), 8 deletions(-)
diff --git a/README.md b/README.md
index 7100e46..80f9d7f 100644
--- a/README.md+++ b/README.md
@@ -12,12 +12,6 @@ First install dependencies:
npm install --production
-### [soju]--Add a WebSocket listener to soju, e.g. `listen wss://127.0.0.1:8080`.--Configure your reverse proxy to serve gamja files and proxy `/socket` to soju.-### [webircgateway]
Setup webircgateway to serve gamja files:
@@ -59,8 +53,27 @@ Start your IRC WebSocket server, e.g. on port 8080. Then run:
-This will start a development HTTP server for gamja. Connect to it and append-`?server=ws://localhost:8080` to the URL.+This will start a development HTTP server for gamja. You can proceed to connect+normally (filling the form), messing with the `config.json` file on gamja's+source code root or overriding the settings via query parameters on the URL.
++In order to use with soju, there's two soju's directives you'll need to+configure, the `listen` directive to make it listen for a incoming WebSocket+connection and the `http-origin` to allow it to receive connections from your+gamja setup.
++In a production environment, you'll likely have soju and gamja running on the+same server, and therefore you can just setup your reverse proxy to serve gamja+files while proxying `/socket` to soju. This will remove the need to set+`http-origin`, and all you'll need is to set soju to listen for a secure+WebSocket connection: `listen wss://127.0.0.1:8000`.
When using a reverse proxy, should probably just listen with ws+insecure? I
guess HTTPS works too, but is a bit unnecessary if the only client will be a
The rest of the examples use :8080 for the example port, not :8000.
++In a development environment, you'll need to allow soju to receive connections+from gamja over a Insecure WebSocket, e.g. `listen+ws+insecure://127.0.0.1:8000` and configure the `http-origin` to the same host+and port.