Genie Discord forum

If I register a channel (called test, for example) and try to connect to it then I receive “Got this payload: ERROR : 404 - Not found”. Has anyone been able to set up any but the default channel?

@Aleksandr can you share some code please?

this definitely works, it's used in many places

Here is a repo with a minimal example: https://github.com/a-ill/test. Run 'Server/startup.jl' to start the server. Go to '/'. It uses the default channel and works. You can broadcast for testing. Go to '/test'. It uses a channel called '/test' and does not work.

yes can you share some code. Last time I checked. I could access them at ____

4 * underscore

use this
using Genie, Genie.Router, Genie.Assets
Genie.config.websockets_server = true # enable the websockets server
route("/") do
Assets.channels_support()
end
up() # start the servers
Genie.WebChannels.broadcast("____", "Hey!")
and you'll see the message in your browser that's connected to 127.0.0.1:8000
-> or whatever the default is

Using the default channel does work. But how can I make another channel work, like "/test", for example?

route("/test")
should work?

@Aleksandr were you able to figure this out? I can not use custom channels too.

@AndiLeni what version of Genie?

@abhimanyuaryan
Julia Version 1.8.5
Commit 17cfb8e65e (2023-01-08 06:45 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: 12 × Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-13.0.1 (ORCJIT, skylake)
Threads: 1 on 12 virtual cores
package status is:
Genie v5.15.0
GenieFramework v1.9.0

I don't know why it doesn't work. Are you using ____
4xunderscore for channel?


Hey I can. But this is not the issue. Custom channels do not work. The channel command should create additional websocket channels as far as I have understood the documentation. But they are not working