linera-io/linera-protocol

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

Open

#1,335 建立於 2023年12月8日

在 GitHub 查看
 (3 留言) (0 反應) (0 負責人)Rust (32,149 star) (2,354 fork)batch import
good first issue

描述

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)?

貢獻者指南