使用NodeJS Gremlin-Javascript连接到OrientDB

时间:2018-10-17 23:08:01

标签: javascript node.js orientdb gremlin

我似乎在尝试使用NodeJS Gremlin-Javascript远程连接到OrientDB实例时遇到连接问题。我尝试用下面的代码连接。我在做什么错了?

const gremlin = require('gremlin');
const Graph = gremlin.structure.Graph;
const DriverRemoteConnection = gremlin.driver.DriverRemoteConnection;

const graph = new Graph();
const g = graph.traversal().withRemote(new DriverRemoteConnection('remote:myhost:2424/mydb'));

我也尝试过:

const gremlin = require('gremlin');
const Graph = gremlin.structure.Graph;
const DriverRemoteConnection = gremlin.driver.DriverRemoteConnection;

const graph = new Graph();
const g = graph.traversal().withRemote(new DriverRemoteConnection('ws://myhost:2424/mydb'));

0 个答案:

没有答案