Closed elbojoloco closed 3 years ago
There is no way to do this as the project is a mesh between a Socket.IO server (and frontend apps must connect using Socket.IO clients; more specific: https://github.com/soketi/soketi-js) and a Pusher-compatible HTTP REST API.
I researched a bit if Socket.IO can be customized to accept a Pusher client to connect and failed so far. If this can be done, I'd be happy to drop soketi-js support in favor of Pusher-compatible Websockets and also REST API, as an alternative to Pusher.
@elbojoloco It took me less than 3 days to build a working Pusher-like server using https://github.com/uNetworking/uWebSockets.js
It's just with basic drivers and functionalities from this project, but soon it will be public. 🤓
@rennokki actually, my question was focussed on back-end / soketi connection. And I found that you can easily configure pusher-server to use a different host. Nodejs example:
const Pusher = require("pusher")
const socket = new Pusher({
appId: "echo-app-id",
key: "echo-app-key",
secret: "echo-app-secret",
host: "127.0.0.1",
port: 6001,
})
// Trigger an event
socket.trigger(channel, event, data)
This project seems to be exactly what I need, but I don't want to be stuck with only being able to use laravel backends. It is pusher compatible, but I have not found a way to change the API host that Pusher-server uses by default. You can only configure the cluster.