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

docs: Add instructions for using Lichess dev server in README #679

Merged
merged 3 commits into from
May 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ Instructions to install both are found in [the lila wiki](https://github.com/lic

The mobile application is configured by default to target `http://127.0.0.1:9663` and `ws://127.0.0.1:9664`, so keep these when installing lila.

### Using Lichess dev server

To use the [Lichess dev](https://lichess.dev/) to run this app, run the following command to set up the Lichess host URLs in the app.

```
Copy link
Contributor

Choose a reason for hiding this comment

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

This code block is a bit confusing as it looks like you'd need to define shell env vars, which is actually not working. It would be better to replace it with the actual full flutter run --dart-define=.... command.

Copy link
Contributor Author

@iamnabink iamnabink May 13, 2024

Choose a reason for hiding this comment

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

Made an another commit, How about this?

Using Lichess dev server

To use the Lichess dev to run this app, run the following command to set up the Lichess host URLs in the app.

flutter run --dart-define=LICHESS_HOST=lichess.dev --dart-define=LICHESS_WS_HOST=socket.lichess.dev

flutter run --dart-define=LICHESS_HOST=lichess.dev --dart-define=LICHESS_WS_HOST=socket.lichess.dev
```

**Note : Do not use any scheme (https:// or ws://) in url in host, since it's already handled by URI helper methods**


## Run

We don't commit generated code to the repository. So you need to run the code
Expand All @@ -47,8 +58,9 @@ dart run build_runner watch
```

Check you have some connected device with: `flutter devices`.
If you target an android emulator you need to run these commands so the device can reach the local lila instance.

If you target an android emulator you need to run these commands so the device can reach the local lila instance:
**Note: Only run the command if you are using a local Lila server; otherwise, there's no need to set up port forwarding.**

```sh
adb reverse tcp:9663 tcp:9663
Expand Down