Skip to content

Setting up the app using a local setup of lichess

Burra Abhishek edited this page Oct 8, 2021 · 3 revisions

This guide helps you to setup lichobile using a local setup of lichess.

Configuration settings

Create a new file in the root directory called appconfig.local.json.

Add the below code and change the port numbers if necessary:

{
  "apiEndPoint": "http://localhost:9663",
  "socketEndPoint": "ws://localhost:9664"
}

Then execute the following command to build lichobile

APP_CONFIG=local npm run build

NOTE: You'll have to setup lila and lila-ws and get them up and running for this to work.

Follow the instructions for running the app in your browser or the instructions for running the app in your device/emulator to get up and running.

Common issues

CORS Errors:

Error messages include Response to preflight request does not pass access control checks. Redirect is not allowed for a preflight request

Solution: In /appconfig.local.json, set apiEndPoint to http://localhost:9663 (Replace the port number if necessary). Use localhost instead of 127.0.0.1 while opening the website. Note that the apiEndPoint should be set to http://localhost:<port> and not http://127.0.0.1:port.

Web socket issues

The socketEndPoint parameter should have ws and not wss.