【发布时间】:2019-03-30 14:11:35
【问题描述】:
使用gremlin-javascript,我正在使用以下方式连接到远程服务器:
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://localhost:8182/gremlin'))
从 gremlin CLI,我可以设置 TinkerGraph 使用
gremlin> graph = TinkerGraph.open()
gremlin> g = graph.traversal()
但是,我想通过localhost:8182 连接到我的图表。这并不完全奏效:
gremlin> graph = RemoteGraph.open('ws://localhost:8182/gremlin')
这也不完全是:
gremlin> graph = TinkerGraph.open()
gremlin> g = graph.traversal().withRemote(new DriverRemoteConnection('ws://localhost:8182/gremlin'))
如何从 CLI 连接到此服务器?
【问题讨论】:
标签: gremlin tinkerpop gremlin-server