Getting Started
This page explains how to run the AttributeDisplay widget locally in standalone mode against a running Octopus backend.
Prerequisites
Octopus backend running on port
8000(GraphQL over HTTP and WebSocket on/graphql).Example endpoints the widget uses:
http://localhost:8000/graphqlandws://localhost:8000/graphql.
Node.js 18+ and npm.
Install and run the widget (standalone)
npm install
# Ensure octopus-backend is running locally on port 8000
# then start the widget dev server
npm run dev
The dev server runs on http://localhost:5174/ by default. The local dev harness is located under dev/ and uses the widget SDK’s createMockHost to connect to your backend:
dev/main.tsxconfigures the mock host (httpUrl,wsUrl).It also provides a sample widget configuration you can tweak during development.
If your backend is running on a different host/port, update those URLs in dev/main.tsx accordingly.
Building the library bundle
To build the distributable IIFE bundle (for use in octopus-frontend):
npm run build
This produces dist/index.iife.js and type declarations in dist/.
Docs quickstart
Install docs tooling: see
docs/requirements-docs.txt.Build docs:
make docs-buildServe docs:
make docs-serve