mirror of
https://github.com/lichess-org/mobile.git
synced 2026-05-26 13:50:52 +00:00
docs: Add instructions for using Lichess dev server in README
This commit is contained in:
@@ -36,6 +36,27 @@ 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 Own Dev Server
|
||||
|
||||
If you don't want to set up your local Lila server, you can use [lichess dev](https://lichess.dev/) server to run this app.
|
||||
Set up the following values as environment variables:
|
||||
|
||||
```
|
||||
LICHESS_HOST=lichess.dev
|
||||
LICHESS_WS_HOST=socket.lichess.dev
|
||||
```
|
||||
|
||||
To do so just use `--dart-define` argument during `flutter run` or `flutter build` command.
|
||||
|
||||
Alternatively, embed the following in your run configuration in your IDE/editor:
|
||||
|
||||
```sh
|
||||
--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
|
||||
@@ -47,8 +68,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
|
||||
|
||||
Reference in New Issue
Block a user