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

Default Port for Running game locally #470

Closed
KingdokRagnarok opened this issue Dec 2, 2024 · 1 comment
Closed

Default Port for Running game locally #470

KingdokRagnarok opened this issue Dec 2, 2024 · 1 comment

Comments

@KingdokRagnarok
Copy link

Short version
I think there's a discrepancy between the readme and the default port for running the game locally

The readme indicates that when you run the game locally, it runs in localhost 3000, but I think the tools/server.js file is having it run in port 3006.

Actual Description of Bug Since I Don't Actually Know What Server.js Does
When I followed the instructions to run the game locally and opened http://localhost:3000/, I got an "Unable to connect" error.

However, my console had the following output:
> [email protected] start [folder location]/zengm
> node tools/server.js
Local: http://localhost:3006
Network: use --host to expose

So I went to http://localhost:3006/ and I was able to play the game there.

In my local copy, I opened the file at /tools/server.js, and I noticed that line 6 indicates a port of 3006. (This appears to be the same in the master branch as linked above)
When I changed the port from 3006 to 3000 and reran pnpm run start, I was able to play the game on localhost:3000.

@dumbmatter
Copy link
Member

Thanks, good catch. I switched the default to 3000 and have it use https://www.npmjs.com/package/get-port to get some other valid port if 3000 is already used.

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

No branches or pull requests

2 participants