boardgameio / boardgame.io

State Management and Multiplayer Networking for Turn-Based Games
https://boardgame.io
MIT License
9.93k stars 704 forks source link

boardgame.io version in examples/react-web/package.json is too old #378

Closed shincar closed 5 years ago

shincar commented 5 years ago

Hello nicolodavis,

I'm playing with multiple player with game master serving. Start from example and found boardgame.io@0.30.0 will start apiServer on ${PORT}+1 that cause authenticated and lobby fail to connect with apiServer. I updated to boardgame.io@0.31.3 and found everything works fine. It would benefit other users to run the example if get it to work.

Symptom

Cause boardgame.io@0.30.0 starts apiServer on ${PORT}+1 so server never got 'get/post' requests from example clients.

Regards, Adam

nicolodavis commented 5 years ago

Hey Adam! Thanks for the report.

I've upgraded the package in the examples. However, just to confirm, how are you running the examples?

You should be doing:

npm install
npm start

from the root of the repository (not from the examples directory). This should just use boardgame.io from the repository (through a babel alias), so the actually package version in the examples does not matter (it always uses the latest code and also allows local modifications in the repository to be seen in the examples).

shincar commented 5 years ago

I run the example from /root/examples/react-web/. I installed esm in that folder also. The command I use is node -r esm server.js to start game server. and npm start to run the project.

Thanks for the hint. I'm new to web development. Too many thing to learn. This boardgame framework is really great. I already built a game with this lib.

Regards, Adam