epicweb-dev / epicshop

The workshop app for all workshops on EpicWeb.dev
https://www.epicweb.dev
Other
207 stars 33 forks source link

custom host ? #164

Closed quangv closed 1 year ago

quangv commented 1 year ago

Hi, I'm using kcdshop via EpicWeb.dev, my machine is Windows and running the workshops on a Linux VM (Fedora-SilverBlue).

In my linux VM, I can do npm run start and I can access it in Chrome on my windows machine, for example: http://192.168.1.100:5639 however the "Start App" stuff in the practice pages doesn't work.

Is there anything I can do to get it to work? Or is it too complicated, and it would only work on localhost ? Thanks!

quangv commented 1 year ago

Could be a related issue but +1 if it could also work on Github Codespaces

Screenshot 2023-10-21 225407
quangv commented 1 year ago
netsh interface portproxy add v4tov4 listenport=5639 listenaddress=127.0.0.1 connectport=5639 connectaddress=192.168.1.100

Making some progress getting this to work, but need to forward all ports it seems...

kentcdodds commented 1 year ago

If I made the iframe use the same domain as the host window (so the IP address instead of localhost) would that solve this? That would be easy.

kentcdodds commented 1 year ago

And yes, you'll need to forward at least port 4000 and 5630 for this to work, bit there are a lot more ports you'll need to forward if you want to support running the problem and solution apps.

quangv commented 1 year ago

i gave up, currently just using Firefox in the VM (and VSCode in the VM) for the Playground, Problem, Solution etc. tabs... and only have to use Windows to watch the videos (sound issues with VM)

I've always had issues dev-ing with Remix with the other method anyway (livereload wouldn't work etc.)

kentcdodds commented 1 year ago

I made a few improvements to this, but it's really going to be a hard time with the way the workshop is intended to be used so I'm going to close this.

quangv commented 1 year ago

Thanks Kent, just wanted to add a note for anyone searching on how to run the EpicWeb.dev workshops in Windows. WSL seems to be working way better than VirtualBox for me.