Prerequisites
- Node.js backend service where the SDK will be installed
- All packages used are present in the “Supported technologies” list below
- Dev/staging environment for initial rollout (recommended)
Supported technologies
- HTTP/HTTPS: All versions (Node.js built-in)
- GRPC:
@grpc/grpc-js@1.x(Outbound requests only) - PG:
pg@8.x,pg-pool@2.x–3.x - Firestore:
@google-cloud/firestore@7.x - Postgres:
postgres@3.x - MySQL:
mysql2@3.x - IORedis:
ioredis@4.x-5.x - Upstash Redis:
@upstash/redis@1.x - GraphQL:
graphql@15.x–16.x - Prisma:
prisma@5.x-6.x - JSON Web Tokens:
jsonwebtoken@5.x–9.x - JWKS RSA:
jwks-rsa@1.x–3.x
Setup
1. Install the Tusk CLI
- Linux/macOS
- Windows
2. Create the Tusk Drift config
Runtusk init in CLI to create your .tusk/config.yaml in the root of your service:
.tusk directory and config file if you’d prefer. See the configuration doc for details.
3. Install and initialize the Drift SDK
Install SDK
Get Tusk API key
If you are only testing out Tusk Drift locally, you can skip creating an API key for now.
Initialize SDK
Follow the below instructions for your type of application to complete initialization.- CommonJS Applications
- If you use TypeScript, your application is likely compiled to CommonJS before running, follow these CommonJS instructions.
- ESM Applications
- If your application’s compiled code uses
importor you do not compile your code, follow these ESM instructions.
- If your application’s compiled code uses
- Next.js Applications