Closed lionhear71994 closed 1 year ago
Hey @lionhear71994,
if your using https in the browser, the driver by default will change to use wss since browser security usually not enables insecure connections happens when you are using secure protocol.
However, you can force disable by:
const driver = neo4j.driver(uri, authtoken, { encrypted: false , //other configs });
const URI = 'neo4j://xxx:7687'; const USER = 'neo4j'; const PASSWORD = 'xxx'; let driver; try { driver = neo4j.driver(URI, neo4j.auth.basic(USER, PASSWORD)); const serverInfo = await driver.getServerInfo(); console.log('Connection established');
when I use code above, always send a wss connection to the xxx:7687, how to change it to ws . Thank you all