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

Feature: Simplify local development and update docs #1

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

Greenheart
Copy link

  • Allow local-coordinator to be executed as a npm binary, unlocking npx local-coordinator after installing local-coordinator in your Hathora project.
  • Improve docs for how to setup a offline dev env.
  • Updated deps to latest patches, and ts-node to latest minor to allow full Node ESM loading support.

Perhaps the main Hathora docs should be improved further too.

@Greenheart
Copy link
Author

@hpx7 Not sure if you've seen this yet, and no rush. Review when you're ready 🙂


```sh
mkcert -install
mkcert localhost
```

Install dependencies:
Make sure to add `*.pem` to your `.gitignore` file to avoid committing the certificate files.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this needed? *.pem is already in the gitignore for this repo

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh i see you're suggesting installing the local-coordinator into your hathora project


Start the coordinator process:
- Install with `npm i https://github.com/hathora/local-coordinator.git`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the advantage of doing this vs just running npm start in this repo?

i guess you get to avoid having to clone this repo?

what about suggesting that people globally install this package? but not sure how they would install the cert files to it

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the input!

The main advantage is installing all project dependencies where they are used, and from the user's perspective, keeping the cert files needed for hathora's local-coordinator in the same project as the other backend code, and game frontend code.

The cert files are the main problem when using a global install, although I guess we could add a CLI option to specify where to find the cert files (or use process.cwd()) to solve that.

Would it be possible to improve the main hathora project to better support a local-coordinator?

Otherwise, feel free to leave this if this is not a priority at the moment!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think you would normally have cert files in your hathora project.

what's the main pain point you currently have with the local-coordinator with hathora?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main pain point is having two separate directories - one for the game and another for local-coordinator

However, there are many ways to automate this.

I'm open to close this and focus on more important improvements.

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

Successfully merging this pull request may close these issues.

2 participants