Use the Lattice SDK for gRPC in JavaScript
This page shows you how to set up the Lattice SDK for gRPC in JavaScript and make a gRPC request.
Click to go to the gRPC SDK repository. By downloading and/or using, you agree to the terms of use. If you do not agree, do not use the SDK.
Before you begin
Before you install and use the gRPC SDK in Java, do the following:
- Complete the setup steps to generate a valid API token and publish at least one entity to your environment.
- Install the latest version of NodeJS.
- Install the TypeScript compiler.
Set up your project
- Create a new folder for your project.
- In your project folder, set up packages and install type definitions for Node.js:
npm init
Install the SDK
To install the gRPC SDK in JavaScript, add the following dependencies to your project:
- npm
- yarn
npm install @anduril-industries/lattice-sdk
npm install @connectrpc/connect
npm install @connectrpc/connect-node
yarn add @anduril-industries/lattice-sdk
yarn add @connectrpc/connect
yarn add @connectrpc/connect-node
Optionally, handle unit tests in your project by installing Mocha:
- npm
- yarn
npm install mocha
yarn add mocha
What's next
- Start building and publishing entities into Lattice.
- Learn how to watch entities, stream specific components, and apply filters.
- See the Lattice sample applications.