-
Notifications
You must be signed in to change notification settings - Fork 4
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
base: develop
Are you sure you want to change the base?
Conversation
@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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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` |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
local-coordinator
to be executed as a npm binary, unlockingnpx local-coordinator
after installinglocal-coordinator
in your Hathora project.ts-node
to latest minor to allow full Node ESM loading support.Perhaps the main Hathora docs should be improved further too.