waku-org / waku-frontend

Waku's frontend. Interact with your waku node via this simple user interface
1 stars 2 forks source link

Add cli flag for SERVICE_ENDPOINT #30

Closed alrevuelta closed 3 months ago

alrevuelta commented 3 months ago

Currently, the SERVICE_ENDPOINT flag is hardcoded:

SERVICE_ENDPOINT = "https://waku.whisperd.tech";

It would be nice to be able to pass it as a CLI argument eg --waku-endpoint so that one can configure beforehand the endpoint that will be used to serve the UI. Required by nwaku-compose.

kaichaosun commented 3 months ago

It can probably hard code to 127.0.0.1:<nwaku-restapi-port>? If there are other possibilities and to env or CLI makes sense.

alrevuelta commented 3 months ago

It can probably hard code to 127.0.0.1:?

Thinking about this from nwaku-compose perspective. We can't hardcode it to 127.0.0.1 since nwaku runs in a different docker host (called nwaku). We could hardcode it to nwaku:port but seems a bit dirty, so I would prefer it configurable.

Both CLI and env variable are fine.

kaichaosun commented 3 months ago

The waku-frontend service can use network_mode: host in docker compose to access the 127.0.0.1. Let me know if it's not working, will figure out how to use CLI/env then

alrevuelta commented 3 months ago

The waku-frontend service can use network_mode: host in docker compose to access the 127.0.0.1. Let me know if it's not working, will figure out how to use CLI/env then

I don't want to access 127.0.0.1, I want to access an arbitrary IP or domain like 1.2.3.4 or nwaku. And ideally this should be configurable via env/cli.

alrevuelta commented 3 months ago

Fixed by #33