RealtimeMultiplayerNodeJs icon indicating copy to clipboard operation
RealtimeMultiplayerNodeJs copied to clipboard

Trouble running server

Open ruttyj opened this issue 5 years ago • 3 comments

Hey,

I'm not able to run this step:

  1. Within another terminal, navigate to the root directory and run "python -m SimpleHTTPServer"

Can you please elaborate?

ruttyj avatar Nov 19 '20 04:11 ruttyj

Not to diss the creator of this repo, this repo is like 10 years old. there are many better alternatives out there like: https://github.com/moddio/taro https://github.com/timetocode/nengi https://github.com/geckosio/geckos.io

m0dE avatar Nov 19 '20 04:11 m0dE

Completely agree with @m0dE -

This repo is pretty out of date, if I was revisiting this concept again I would architect it quite different (although keeping the core ideas).

I would say, watch this conf talk I gave when I made this repo, and borrow ideas from it - but looking at the alternatives they look really great and up to date compared to this repo

onedayitwillmake avatar Nov 20 '20 01:11 onedayitwillmake

However to answer your question:

Within another terminal, navigate to the root directory and run "python -m SimpleHTTPServer"

Browsers add restrictions when browsing from the local file system (such as connecting to a websocket). Hence we use the above command, to start an HTTP server, which will serve the index.html so that you are not browsing HTML files from file://

If you're on windows, i'm nto sure what the steps would be - but anything that can serve the files will do

onedayitwillmake avatar Nov 20 '20 01:11 onedayitwillmake