Closed wey-gu closed 2 years ago
npm install @nebula-contrib/nebula-nodejs
// ESM import { createClient } from '@nebula-contrib/nebula-nodejs' // CommonJS // const { createClient } = require('@nebula-contrib/nebula-nodejs') // Connection Options const options = { servers: ['ip-1:port','ip-2:port'], userName: 'xxx', password: 'xxx', space: 'space name', poolSize: 5, bufferSize: 2000, executeTimeout: 15000, pingInterval: 60000 } // Create client const client = createClient(options) // Execute command // 1. return parsed data (recommend) const response = await client.execute('GET SUBGRAPH 3 STEPS FROM -7897618527020261406') // 2. return nebula original data const responseOriginal = await client.execute('GET SUBGRAPH 3 STEPS FROM -7897618527020261406', true)
@wujjpp could you please take a look at this PR :)