Skip to content

Commit d6918f6

Browse files
committed
Add custom resolver example
1 parent 15deb86 commit d6918f6

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/v1/examples.test.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,21 @@ describe('examples', () => {
186186
};
187187
});
188188

189+
it('config custom resolver example', done => {
190+
const virtualUri = 'bolt+routing://x.acme.com';
191+
192+
// tag::config-custom-resolver[]
193+
const driver = neo4j.driver(virtualUri, neo4j.auth.basic(user, password), {
194+
resolver: function (address) {
195+
return ['a.acme.com:7575', 'b.acme.com:7676', 'c.acme.com:8787'];
196+
},
197+
});
198+
// tag::config-custom-resolver[]
199+
200+
driver.close();
201+
done();
202+
});
203+
189204
it('custom auth example', done => {
190205
const principal = user;
191206
const credentials = password;

0 commit comments

Comments
 (0)