Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Connect to Neo4j Database Instance #13

Closed
Ifeanyi55 opened this issue Jan 15, 2024 · 5 comments
Closed

Unable to Connect to Neo4j Database Instance #13

Ifeanyi55 opened this issue Jan 15, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@Ifeanyi55
Copy link

I have cloned the github repository of the Needles StarterKit and installed the dependencies using npm i, and launched the application using npm run dev. This is what I see

neo4j starter

However, I am unable to connect to Neo4j by clicking the "Connect to Neo4j" button. Nothing works when I do that, and I have a sandbox instance running. Where do I go from here, please?

@Ifeanyi55 Ifeanyi55 added the bug Something isn't working label Jan 15, 2024
@msenechal msenechal self-assigned this Jan 15, 2024
@msenechal
Copy link
Collaborator

Hi @Ifeanyi55 , thanks for raising the issue.
For the installation and running it, please use yarn instead of npm as per the documentation:

yarn i
yarn run dev

For the connectivity issue, I just tried to start a Neo4j sandbox + connect to it and did face any issues.
Can you please:

  • Open the developer console, click connect and paste here any errors showing up in the console
  • Make sure the protocol, hostname and port, username and password are correct to your sandbox instance
    For example, mine looks like:
    Protocol: bolt+s
    Hostname: 7ee956fdb672a512b2a7937f53234d73.neo4jsandbox.com
    Port: 7687

@Ifeanyi55
Copy link
Author

Thanks @msenechal for reacting to my issue. I have been able to connect to my sandbox instance, after running yarn run dev. Nevertheless, I do not know where to go from here as there isn't much options on the interface. For example, where do I write javascript code? Is there a comprehensive getting started documentation I could consult to get started using this application? My interface is the same as in the screenshot above. The only difference now is that I have connected to Neo4j sandbox. I would appreciate any advice you give. Thanks!

@msenechal
Copy link
Collaborator

Hi @Ifeanyi55 , glad to hear that fixed your issue and you were able to connect to your sandbox Neo4j DB.
So this StarterKit is meant to be a template so you will indeed have to write the logic to retrieve+visualize your data.

In short, this can be done by adding your functions to the Driver.tsx and calling them in the Content.tsx + rendering it.
For example, you can write a function getPersons() in Driver.tsx which would be a

MATCH (p:Person) RETURN p LIMIT 5

Then, in Content.tsx you would call this getPersons(), fetch the data and render person.name in a table or use a visualization library to render a graph.

You can find more information on the Neo4j Javascript Driver here: https://neo4j.com/docs/javascript-manual/current/ .
Apart from this official javascript documentation, there is no "getting started" specific for this StarterKit, altho I think it would be a great addition.
I created a doc improvement GH Issue that you can follow here. Since this is a different issue and your initial issue is now resolved, I will go ahead and close this one.
Thanks again for raising this and for providing valuable feedback!

@Ifeanyi55
Copy link
Author

Thanks @msenechal

@msenechal
Copy link
Collaborator

FYI @Ifeanyi55 , the doc has now been published and a small example is now available in the official documentation:
https://neo4j.com/labs/neo4j-needle-starterkit/1.0/examples/

@neo4j-labs neo4j-labs locked as resolved and limited conversation to collaborators Jan 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants