Skip to content

Commit 6da341e

Browse files
authored
Add info on how to connect with Astra
Include Astra information on the homepage and the getting started guide.
1 parent b5b0ae7 commit 6da341e

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,16 @@ you can choose the approach that suits your needs.
6161
Note that in order to have concise code examples in this documentation, we will use the promise-based API of the
6262
driver along with the `await` keyword.
6363

64+
If you are using [DataStax Astra][astra] you can configure your client by setting the secure bundle and the
65+
user credentials:
66+
67+
```javascript
68+
const client = new cassandra.Client({
69+
cloud: { secureConnectBundle: 'path/to/secure-connect-DATABASE_NAME.zip' },
70+
credentials: { username: 'user_name', password: 'p@ssword1' }
71+
});
72+
```
73+
6474
### Prepare your queries
6575

6676
Using prepared statements provides multiple benefits.
@@ -281,3 +291,4 @@ Unless required by applicable law or agreed to in writing, software distributed
281291
[streams2]: https://nodejs.org/api/stream.html#stream_class_stream_readable
282292
[cql-udt]: https://cassandra.apache.org/doc/latest/cql/types.html#udts
283293
[dse]: https://www.datastax.com/products/datastax-enterprise
294+
[astra]: https://www.datastax.com/products/datastax-astra

doc/getting-started/README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,15 @@ Even though calling `connect()` is not required (the `execute()` method internal
2929
recommended you call to `#connect()` on application startup, this way you can ensure that you start your app once
3030
your are connected to your cluster.
3131

32+
When using [DataStax Astra][astra] you can configure your client by setting the secure bundle and the user credentials:
33+
34+
```javascript
35+
const client = new cassandra.Client({
36+
cloud: { secureConnectBundle: 'path/to/secure-connect-DATABASE_NAME.zip' },
37+
credentials: { username: 'user_name', password: 'p@ssword1' }
38+
});
39+
```
40+
3241
## Retrieving data
3342

3443
The `execute()` method can be used to send a CQL query to a Cassandra node.
@@ -179,4 +188,5 @@ client.executeGraph('g.V().count()', null, { executionProfile: 'graph' });
179188
[datatypes]: /features/datatypes/
180189
[mapper]: /features/mapper/
181190
[mapper-guide]: /features/mapper/getting-started/
182-
[async-functions]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function
191+
[async-functions]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function
192+
[astra]: https://www.datastax.com/products/datastax-astra

0 commit comments

Comments
 (0)