linera-protocol
linera-protocol copied to clipboard
Update Web frontends so that `npm start` automatically launches the correct URL
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=$PORTwhere
- the path is the ID of the chain where the account is located.
- the argument
appis the token application ID obtained when creating the token.owneris the address of the chosen user account (owner must be have permissions to create blocks in the given chain).portis the port of the wallet service (the wallet must know the secret key ofowner).
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)?
(Related: https://github.com/linera-io/linera-protocol/pull/1358)
I've updated this issue to refer only to the more general solution, since @afck implemented the README change it originally referred to :)
Is this issue still open ?