kevinshen56714 / SkyOffice

Immersive virtual office built with Phaser, React, Redux, PeerJS, and Colyseus.
https://sky-office.co/
MIT License
930 stars 289 forks source link

Production deployment keeps at "connecting to server" #67

Closed streamerd closed 1 year ago

streamerd commented 1 year ago

Good days,

Thank you very much for this project and your contribution to the open source!

I've just deployed the project on netlify, and have this: https://starlit-treacle-42d97a.netlify.app

Currently it keeps the "connecting to server" message and private/public room functionality is not ready yet. Is there any other required steps we need to take to make it work?

Seems like there's no command issued @ server folder @ netlify.toml, are we missing the backend here? :)

jga-dev commented 1 year ago

Hi, Netlify only deploy frontend. Have you set the environment variables in netlify? You must have the variable _VITE_SERVERURL pointing to your server... The server can be mounted on a heroku or similar... So when you have the address put it in the environment variable. For example: wss://whatever.herokuapp.com

streamerd commented 1 year ago

hey @jga-dev thank you very much for your pointer. Any address that starts https:// after deployment, changing the protocol to wss:// indeed works.

got it deployed ;) now worx ~