Durtur / Dungeoneer

A virtual tabletop designed for 5e D&D, includes a map tool with dynamic lighting, initiative tracker, combat tracker and homebrew management.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hosting clients

Jorgelzn opened this issue · comments

Hi, good evening.

First of all, awesome project !!!
I have no experience in server development. I have build your code and tested a client in my browser with the link you provide. I have seen that you are hosting the client web and also you have what I think is a server in dungeoneer-peer-js-server.onrender.com which i suppose is the one connecting client with server ?
I want to understand how you do it because i want to learn in case i need to host a client web myself. It would be great if you could explain it to me.

Kind regards

Hey! The peer js server is just a build of the peerjs server: https://github.com/peers/peerjs-server.

All communication between the electron app and the client web page is done through webrtc, so there isn't really a server. The peer js server just handles initial discovery, allowing peers to connect.

So hosting your own client is easy, it's enough even to just open the html file from your local file system. I guess you can easily add stuff to the client page, but the map logic is not really well compartmentalized. It's an old project and it's one of the things I'd like to refactor.

Oh cool, thank you for answering !!

And, the peer js server that you use in the project, you are hosting it, or it is like a generic one?
In case you are hosting It, It could be done with GitHub pages or do i need a paid hosting service? (because what I know is that pages is only for static webs)

Oh cool, thank you for answering !!

And, the peer js server that you use in the project, you are hosting it, or it is like a generic one?
In case you are hosting It, It could be done with GitHub pages or do i need a paid hosting service? (because what I know is that pages is only for static webs)

I'm hosting it using render free hosting. It's just the most recent build from the peerjs server repo. You don't need to host your own unless you don't have internet outside from your local network.

Peerjs has a generic one running I believe, which is what the package defaults to if no connection params are set, but that got taken down for a little while, so I decided to host my own for this project.

I see, thank you so much for the explanation and again awesome project !!!