Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hosting clients #106

Open
Jorgelzn opened this issue Jan 27, 2024 · 4 comments
Open

Hosting clients #106

Jorgelzn opened this issue Jan 27, 2024 · 4 comments
Labels
question Further information is requested

Comments

@Jorgelzn
Copy link

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

@Jorgelzn Jorgelzn added the question Further information is requested label Jan 27, 2024
@Durtur
Copy link
Owner

Durtur commented Jan 29, 2024

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.

@Jorgelzn
Copy link
Author

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)

@Durtur
Copy link
Owner

Durtur commented Jan 30, 2024

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.

@Jorgelzn
Copy link
Author

Jorgelzn commented Feb 4, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants