Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.
/ web-sdk-examples Public archive

Contains code examples for using Vertex's Web UI Components.

License

Notifications You must be signed in to change notification settings

Vertexvis/web-sdk-examples

Repository files navigation

Vertex Web SDK Examples

This repository contains examples for interacting with the Vertex Web SDK.

Deprecation Warning

This repository is deprecated. See examples directory in vertex-web-sdk.

Setup

Make sure you have Yarn installed.

  • Run yarn install to install dependencies.
  • Obtain a clientid and streamkey following this guide

Running

Run yarn start to spin up a local development environment. The development environment includes a server to host static assets from the examples directory, and a simple backend that demonstrates how the client retrieves a token from the Vertex platform.

After you run yarn start, open navigate your browser to http://localhost:8080?clientid=YOUR_CLIENT_ID&streamkey=YOUR_STREAM_KEY to browser the examples. The stream-key provided here will be the default used for examples making use of the loadViewerWithQueryParams helper function. The development environment supports live refresh. Any changes you make the examples will automatically refresh your browser.

Note: These examples make use of more modern EcmaScript features. You'll need a browser that supports ES modules. Most modern browsers (Chrome, Edge, Firefox, Safari) support these features.

Contributions

We provide a script that you can run to create a new example. Run yarn scaffold [name] to create a new example.