Skip to content

Commit 91d8524

Browse files
fix failing check
1 parent a992459 commit 91d8524

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

README.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -67,22 +67,24 @@ Valid connection string args:
6767
| bearertoken | \<token\> | an access token |
6868
| sslmode | disable \| require \| verify-ca | TLS option, the default is `disable`. If `verify-ca` is set, the TLS certificate configured in the Dgraph cluster must be from a valid certificate authority. |
6969

70-
## Some example connection strings: | Value | Explanation | |
70+
## Some example connection strings:
7171

72-
| ----------------------------------------------------------------------------------- | |
73-
dgraph://localhost:9080 | Connect to localhost, no ACL, no TLS | |
74-
dgraph://sally:supersecret@dg.example.com:443?sslmode=verify-ca | Connect to remote server, use ACL
75-
and require TLS and a valid certificate from a CA | |
76-
dgraph://foo-bar.grpc.us-west-2.aws.cloud.dgraph.io:443?sslmode=verify-ca&apikey=\<your-api-connection-key\>
77-
| Connect to a Dgraph Cloud cluster | |
78-
dgraph://foo-bar.grpc.hypermode.com?sslmode=verify-ca&bearertoken=\<some access token\> | Connect to
79-
a Dgraph cluster protected by a secure gateway |
72+
| Value | Explanation |
73+
| ------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------- |
74+
| dgraph://localhost:9080 | Connect to localhost, no ACL, no TLS |
75+
| dgraph://sally:supersecret@dg.example.com:443?sslmode=verify-ca | Connect to remote server, use ACL and require TLS and a valid certificate from a CA |
76+
| dgraph://foo-bar.grpc.us-west-2.aws.cloud.dgraph.io:443?sslmode=verify-ca&apikey=\<your-api-connection-key\> | Connect to a Dgraph Cloud cluster |
77+
| dgraph://foo-bar.grpc.hypermode.com?sslmode=verify-ca&bearertoken=\<some access token\> | Connect to a Dgraph cluster protected by a secure gateway |
8078

81-
Using the `Open` function with a connection string: // open a connection to an ACL-enabled, non-TLS
82-
cluster and login as groot const {client,closeStub} =
83-
dgraph.Open("dgraph://groot:password@localhost:8090")
79+
Using the `Open` function with a connection string:
8480

85-
````
81+
```js
82+
// open a connection to an ACL-enabled, non-TLS cluster and login as groot
83+
const { client, closeStub } = dgraph.Open("dgraph://groot:password@localhost:8090")
84+
// Use the client
85+
86+
closeStub()
87+
```
8688

8789
To facilitate debugging, [debug mode](#debug-mode) can be enabled for a client.
8890

@@ -97,7 +99,7 @@ In order to create a JavaScript client, and make the client login into namespace
9799
```js
98100
const dgraphClientStub = new dgraph.DgraphClientStub("localhost:9080")
99101
await dgraphClientStub.loginIntoNamespace("groot", "password", 123) // where 123 is the namespaceId
100-
````
102+
```
101103

102104
In the example above, the client logs into namespace `123` using username `groot` and password
103105
`password`. Once logged in, the client can perform all the operations allowed to the `groot` user of

0 commit comments

Comments
 (0)