You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 30, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,10 @@
2
2
3
3
All notable changes to the LaunchDarkly Node.js SDK DynamoDB integration will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org).
4
4
5
-
## [1.0.0] - 2018-11-15
6
-
7
-
Initial release.
8
-
9
5
## [1.1.0] - 2018-11-20
10
6
### Added:
11
7
- it is now possible to specify a prefix string for the database keys, so that multiple SDK clients can share the same DynamoDB table without interfering with each other's data as long as they use different prefixes.
Copy file name to clipboardExpand all lines: README.md
+11-10Lines changed: 11 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,37 +13,37 @@ Quick setup
13
13
14
14
This assumes that you have already installed the LaunchDarkly Node.js SDK.
15
15
16
-
1. Install this package with `npm`:
16
+
1. In DynamoDB, create a table which has the following schema: a partition key called "namespace" and a sort key called "key", both with a string type. The LaunchDarkly library does not create the table automatically, because it has no way of knowing what additional properties (such as permissions and throughput) you would want it to have.
17
+
18
+
2. Install this package with `npm`:
17
19
18
20
npm install ldclient-node-dynamodb-store --save
19
21
20
-
2. Require the package:
22
+
3. Require the package:
21
23
22
24
var DynamoDBFeatureStore = require('ldclient-node-dynamodb-store');
23
25
24
-
3. When configuring your SDK client, add the DynamoDB feature store:
26
+
4. When configuring your SDK client, add the DynamoDB feature store:
25
27
26
28
var store = DynamoDBFeatureStore('YOUR TABLE NAME');
27
29
var config = { featureStore: store };
28
30
var client = LaunchDarkly.init('YOUR SDK KEY', config);
29
31
30
-
The specified table must already exist in DynamoDB. It must have a partition key called "namespace" and a sort key called "key".
31
-
32
-
By default, the DynamoDB client will try to get your AWS credentials and region name from environment variables and/or local configuration files, as described in the AWS SDK documentation. You can also specify any valid [DynamoDB client options](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB.html#constructor-property) like this:
32
+
By default, the DynamoDB client will try to get your AWS credentials and region name from environment variables and/or local configuration files, as described in the AWS SDK documentation. You can also specify any valid [DynamoDB client options](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB.html#constructor-property) like this:
var store = DynamoDBFeatureStore('YOUR TABLE NAME', { clientOptions: dynamoDBOptions });
36
36
37
-
Alternatively, if you already have a fully configured DynamoDB client object, you can tell LaunchDarkly to use that:
37
+
Alternatively, if you already have a fully configured DynamoDB client object, you can tell LaunchDarkly to use that:
38
38
39
39
var store = DynamoDBFeatureStore('YOUR TABLE NAME', { dynamoDBClient: myDynamoDBClientInstance });
40
40
41
-
4. If you are running a [LaunchDarkly Relay Proxy](https://github.com/launchdarkly/ld-relay) instance, or any other process that will prepopulate the DynamoDB table with feature flags from LaunchDarkly, you can use [daemon mode](https://github.com/launchdarkly/ld-relay#daemon-mode), so that the SDK retrieves flag data only from DynamoDB and does not communicate directly with LaunchDarkly. This is controlled by the SDK's `useLdd` option:
41
+
5. If you are running a [LaunchDarkly Relay Proxy](https://github.com/launchdarkly/ld-relay) instance, or any other process that will prepopulate the DynamoDB table with feature flags from LaunchDarkly, you can use [daemon mode](https://github.com/launchdarkly/ld-relay#daemon-mode), so that the SDK retrieves flag data only from DynamoDB and does not communicate directly with LaunchDarkly. This is controlled by the SDK's `useLdd` option:
42
42
43
43
var config = { featureStore: store, useLdd: true };
44
44
var client = LaunchDarkly.init('YOUR SDK KEY', config);
45
45
46
-
5. If the same DynamoDB table is being shared by SDK clients for different LaunchDarkly environments, set the `prefix` option to a different short string for each one to keep the keys from colliding:
46
+
6. If the same DynamoDB table is being shared by SDK clients for different LaunchDarkly environments, set the `prefix` option to a different short string for each one to keep the keys from colliding:
47
47
48
48
var store = DynamoDBFeatureStore('YOUR TABLE NAME', { prefix: 'env1' });
49
49
@@ -55,7 +55,7 @@ To reduce traffic to DynamoDB, there is an optional in-memory cache that retains
55
55
var store = DynamoDBFeatureStore('YOUR TABLE NAME', { cacheTTL: 0 });
56
56
57
57
About LaunchDarkly
58
-
-----------
58
+
------------------
59
59
60
60
* LaunchDarkly is a continuous delivery platform that provides feature flags as a service and allows developers to iterate quickly and safely. We allow you to easily flag your features and manage them from the LaunchDarkly dashboard. With LaunchDarkly, you can:
61
61
* Roll out a new feature to a subset of your users (like a group of users who opt-in to a beta tester group), gathering feedback and bug reports from real-world use cases.
0 commit comments