linera-protocol icon indicating copy to clipboard operation
linera-protocol copied to clipboard

Update Web frontends so that `npm start` automatically launches the correct URL

Open Twey opened this issue 2 years ago • 3 comments

Currently we require the user to manually input Linera details into the URL to launch frontends. For example, the fungible README says:

Start the server but not open the web page right away.

BROWSER=none npm start &

Web UIs for specific accounts can be opened by navigating URLs of the form http://localhost:3000/$CHAIN?app=$APP_ID&owner=$OWNER&port=$PORT where

  • the path is the ID of the chain where the account is located.
  • the argument app is the token application ID obtained when creating the token.
  • owner is the address of the chosen user account (owner must be have permissions to create blocks in the given chain).
  • port is the port of the wallet service (the wallet must know the secret key of owner).

If these instructions are not followed precisely, the frontend errors (in relatively mysterious ways, showing a blank page to the user).

All this information is available in the environment or by invoking linera wallet; can we automatically add it to the frontend (at least as defaults) when we launch it instead of requiring the user to enter it, so that npm start just works (launches the browser to the frontend open and connected to the running application)?

Twey avatar Dec 08 '23 10:12 Twey

(Related: https://github.com/linera-io/linera-protocol/pull/1358)

afck avatar Dec 12 '23 14:12 afck

I've updated this issue to refer only to the more general solution, since @afck implemented the README change it originally referred to :)

Twey avatar Jan 02 '24 17:01 Twey

Is this issue still open ?

Marvelousmicheal avatar Feb 03 '25 16:02 Marvelousmicheal