Skip to content

Repository files navigation

SDK

NPM Version Discord

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.


Getting started

Prerequisites

  1. A Hardpoint account and valid Org ID: Sign up for free to get one
  2. A JavaScript/TypeScript project running on Vercel
  3. An agent configured to expose at least one service

Installation

The SDK can be installed like any other npm module:

npm i --save @hardpointlabs/sdk

Setup

Import 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

Next steps

About

Integration point into the Hardpoint Platform

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages