Skip to content

Commit

Permalink
Update README for node.js based apps
Browse files Browse the repository at this point in the history
  • Loading branch information
winsmith committed Nov 16, 2023
1 parent 3373127 commit 13e40f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Please install the package using npm or the package manager of your choice

### 2. Initializing TelemetryDeck

Initialize the TelemetryDeck SDK with your app ID and your user's user identifer. Since `globalThis.crypto.subtle.digest` does not exist in Node.js, you need to pass in an alternative implementation provided by Node.js.
Initialize the TelemetryDeck SDK with your app ID and your user's user identifer. Since `globalThis.crypto.subtle` does not exist in Node.js, you need to pass in an alternative implementation provided by Node.js.

```javascript
import TelemetryDeck from '@telemetrydeck/sdk';
Expand All @@ -55,7 +55,7 @@ import crypto from 'crypto';
const td = new TelemetryDeck({
appID: '<YOUR_APP_ID>'
user: '<YOUR_USER_IDENTIFIER>',
cryptoDigest: crypto.webcrypto.subtle.digest,
subtleCrypto: crypto.webcrypto.subtle,
});
```

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"bugs": {
"url": "https://github.com/TelemetryDeck/JavaScriptSDK/issues"
},
"homepage": "https://github.com/TelemetryDeck/JavaScriptSDK#readme",
"homepage": "https://telemetrydeck.com/",
"engines": {
"node": ">=18"
},
Expand Down

0 comments on commit 13e40f3

Please sign in to comment.