Using gremlin-javascript
, I'm connecting to a remote server using:
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'))
From the gremlin CLI, I can setup a TinkerGraph
using
gremlin> graph = TinkerGraph.open()
gremlin> g = graph.traversal()
However, I'd like to connect to my Graph at localhost:8182
. This doesnt't quite do the trick:
gremlin> graph = RemoteGraph.open('ws://localhost:8182/gremlin')
And this isn't quite it either:
gremlin> graph = TinkerGraph.open()
gremlin> g = graph.traversal().withRemote(new DriverRemoteConnection('ws://localhost:8182/gremlin'))
How would I connect to this server from the CLI?
console mode
Thanks again! – Leopoldeen