docs: fix node sdk initialization (#163)

This commit is contained in:
KM Koushik
2025-05-17 14:13:32 +10:00
committed by GitHub
parent e850512f0a
commit 14557a96ac
5 changed files with 19 additions and 5 deletions

View File

@@ -38,7 +38,14 @@ icon: node-js
```javascript
import { Unsend } from "unsend";
const unsend = new Unsend({ apiKey: "us_12345" });
const unsend = new Unsend("us_12345");
```
If you are running a self-hosted version of Unsend, pass the base URL as the
second argument:
```javascript
const unsend = new Unsend("us_12345", "https://my-unsend-instance.com");
```
</Step>