@jsontech/sdk-js 0.0.7 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ import { ShipItClient } from '@jsontech/sdk-js';
|
|
|
22
22
|
// SDK automatically uses production API URL
|
|
23
23
|
// Set SHIPIT_CLIENT_KEY or SHIPIT_SERVER_KEY env var, or pass sdkKey explicitly
|
|
24
24
|
const shipit = new ShipItClient({
|
|
25
|
-
sdkKey: '
|
|
25
|
+
sdkKey: 'your-sdk-key-here'
|
|
26
26
|
});
|
|
27
27
|
|
|
28
28
|
const enabled = await shipit.bool('new-nav', { id: 'user-123' }, false);
|
|
@@ -46,7 +46,7 @@ const shipit = new ShipItClient();
|
|
|
46
46
|
The SDK automatically determines the API base URL:
|
|
47
47
|
|
|
48
48
|
- **Browser**: Uses `window.location.origin` (assumes API is on same origin)
|
|
49
|
-
- **Node.js**: Uses
|
|
49
|
+
- **Node.js**: Uses the production ShipIt API endpoint
|
|
50
50
|
|
|
51
51
|
The API URL cannot be overridden.
|
|
52
52
|
|
|
@@ -120,10 +120,10 @@ try {
|
|
|
120
120
|
|
|
121
121
|
Each environment has two SDK keys:
|
|
122
122
|
|
|
123
|
-
- **Server key
|
|
124
|
-
- **Client key
|
|
123
|
+
- **Server key**: Secret. Use only in trusted server environments.
|
|
124
|
+
- **Client key**: Not a secret. Intended for browser/mobile SDKs.
|
|
125
125
|
|
|
126
|
-
Get your SDK keys from
|
|
126
|
+
Get your SDK keys from your ShipIt Console → Environments.
|
|
127
127
|
|
|
128
128
|
## License
|
|
129
129
|
|