cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Desktop neo4j uri format

Hello All,

How to connect to neo4j desktop db in an JavaScript express app? what is the uri of the desktop db in the below snippet? Also after initializing the session in a express js module how to use it in another module?

const driver = neo4j.driver(uri, neo4j.auth.basic(user, password))
const session = driver.session()

Thanks,
Arun

7 REPLIES 7

If you're using Neo4j Desktop, you're likely talking about a local database.
In this case, the URI can be either: bolt://localhost or neo4j://localhost (default port is 7687), both will work.

yes, I'm using a local database.Which url should I use to connect from the JavaScript driver?

See message just above 🙂

Can I use both the url formats?

How to create only a single instance of connection to reuse the connection instance across modules?

@florent.biville1 In the neo4j desktop app's window top bar it the string shows up as

neo4j@bolt://localhost:7687/neo4j . How do I specify the username and password?

I'd like to connect to the expressAuth database under the Chat project.