I’m trying to connect to Neo4j Aura DB from a JavaScript script. The connection works fine in Python.
Any idea where the below error comes from ?
index.html
<!DOCTYPE html>
<html>
<body>
<script type="module" src="test_connection_to_db.js"></script>
</body>
</html>
test_connection_to_db.js
import neo4j from './neo4j-driver';
(async () => {
const URI = 'neo4j+s://<my working hostname>;
const USER = 'neo4j';
const PASSWORD = <my working password>;
let driver
try {
driver = neo4j.driver(URI, neo4j.auth.basic(USER, PASSWORD))
const serverInfo = await driver.getServerInfo()
console.log('Connection established')
console.log(serverInfo)
} catch(err) {
console.log(`Connection errorn${err}nCause: ${err.cause}`)
}
})();
Error
Failed to load resource: the server responded with a status of 404 (Not Found) neo4j-driver:1
Thanks for your support !