WebSocket connection to 'ws://localhost:1234/tiptap' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED

@canadaduane Hi Duane!
I’m trying now to make a further step .
Even if my app will be deployed in the cloud, I’m developing it at the moment in a local PC.
Just to understand how to make it work properly, I tried to use Realtime.js as is, with
const provider = new WebsocketProvider(‘ws://localhost:1234’, ‘tiptap’, ydoc)

In the nginx webserver configuration I’ve put this part for the websocket:

map $http_upgrade $connection_upgrade {
  default upgrade;
  '' close;
}

upstream websocket {
    server ggc.world:1234;
}

server {
    listen 8443 ssl;
    server_name ggc.world;

    ssl_certificate /etc/letsencrypt/live/ggc.world-0002/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/ggc.world-0002/privkey.pem; # managed by Certbot
    ssl_trusted_certificate /etc/letsencrypt/live/ggc.world-0002/chain.pem;
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

    location / {
        proxy_pass http://websocket;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;
        proxy_set_header Host $host;
    }
}

I run the y-websocket-server locally:

(base) marco@pc01:~/webMatters/vueMatters/GGC$ PORT=1234 npx y-websocket-server
running on port 1234

When running the app I get this error:

WebSocket connection to ‘wss://localhost:1234/tiptap’ failed: Error in connection establishment: nett::ERR_SSL_PROTOCOL_ERROR

I tried to change in nginx configuration:

upstream websocket {
    #server ggc.world:1234;
    server 127.0.0.1:1234;
}

server {
    listen 8443 ssl;
    server_name ggc.world;

But again:
“WebSocket connection to 'wss://localhost:1234/tiptap’failed: Error in connection establishment: net::ERR_SSL_PROTOCOL_ERROR”

If nginx is listening port 8443 for ssl, should I put it somewhere in Realtime.js ?
How to make it work?