@hardpointlabs/sdk
    Preparing search index...

    @hardpointlabs/sdk

    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

    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

    The SDK can be installed like any other npm module:

    npm i --save @hardpointlabs/sdk
    

    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