The SDK integrates your application code with Hardpoint Connect. It's compatible with server-side JavaScript and TypeScript projects running on node 22 or greater.
- A Hardpoint account and valid Org ID: Sign up for free to get one
- A JavaScript/TypeScript project running on Vercel
- An agent configured to expose at least one service
The SDK can be installed like any other npm module:
npm i --save @hardpointlabs/sdkImport the SDK and initialize it once when your application starts up:
import { Sdk } from '@hardpointlabs/sdk'
// Specify your Hardpoint Org ID
const sdk = Sdk.init({orgId: '<YOUR_ORG_ID>'})Now you can connect to a service:
// ctx is a RequestContext object
await using tunnel = sdk.connect('postgres.prod', ctx)
// pass {tunnel} to your postgres client- See client-specific examples in the docs
- The full SDK API docs are here