Skip to content

Commit d750903

Browse files
committed
Remove trailing commas in simple example - not supported in Node.js v7
1 parent 8263326 commit d750903

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

examples/simple/index.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@ const grpc = require("grpc");
33

44
// Create a client.
55
function newClient() {
6-
const clientStub = new dgraph.DgraphClientStub(
7-
"localhost:9080",
8-
grpc.credentials.createInsecure(),
9-
);
10-
6+
const clientStub = new dgraph.DgraphClientStub("localhost:9080", grpc.credentials.createInsecure());
117
return new dgraph.DgraphClient(clientStub);
128
}
139

@@ -28,13 +24,11 @@ async function setSchema(dgraphClient) {
2824

2925
// Create a node for a person with name Alice.
3026
async function createAlice(dgraphClient) {
31-
// Create a new transaction
27+
// Create a new transaction.
3228
const txn = dgraphClient.newTxn();
3329
try {
3430
// Create data.
35-
const p = {
36-
name: "Alice",
37-
};
31+
const p = { name: "Alice" };
3832

3933
// Serialize it.
4034
const json = JSON.stringify(p);

0 commit comments

Comments
 (0)