To install Yaci Viewer globally, run:
npm install -g @bloxbean/yaci-viewer
- Start the Yaci DevKit.
- Run the following command:
yaci-viewer
By default, Yaci Viewer connects to a Yaci-Store backend running on localhost
at port 8080
.
If you need to connect to a Yaci-Store backend running on a different host or port, you can configure Yaci Viewer in one of the following ways:
Create a .env
file in the same directory where you are starting Yaci Viewer, and specify the following environment variables:
PUBLIC_INDEXER_BASE_URL
: The base URL for the indexer API. Default:http://localhost:8080/api/v1
.PUBLIC_INDEXER_WS_URL
: The WebSocket URL for live updates. Default:ws://localhost:8080/ws/liveblocks
.
You can also specify the indexer base URL and WebSocket URL directly via command-line arguments:
yaci-viewer --indexerBaseUrl http://new-url.com/api/v1 --indexerWsUrl ws://new-url.com/ws/liveblocks
- Ensure that the YaciDevKit or Yaci-Store backend is running and accessible before starting Yaci Viewer.
Once you've checked out the project and installed dependencies with npm install
start a development server:
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
Note: Ensure that Yaci DevKit is running and that you have created a
.env
file with the indexer URLs in the viewer folder. For the required environment variables, refer to theenv.example
file.
To create a production version of the app:
npm run build