mojo2go
(Mojo2go)
November 2, 2020, 2:42pm
1
Svelte.js is a front-end only web 'framework'. Introduction / Basics • Svelte Tutorial
I would like to use it to connect to Neo4j.
I feel that this must be possible using one of our browser-based bolt access methods, i.e.:
I have not managed to make an connection to my local Neo4j Desktop database. I would love to see the simplest working example.
What have you tried? What was the result?
akollegger1
(Andreas Kollegger)
November 3, 2020, 3:00pm
3
Hi @mojo2go ,
I'm not very svelte, but here's an example that can send arbitrary cypher and display the raw results.
Some notes:
the username/password is pulled using dotenv then added to the app using rollup/plugin-replace (probably that is not safe/advised)
Neo4j Desktop has to be already running before the app page loads
the Neo4j driver connection string assumes the default port. you can check the "manage" screen of a running database to see what port 'bolt' is using
Let me know if this helps.
Best,
ABK
1 Like
mojo2go
(Mojo2go)
November 6, 2020, 10:37pm
4
Andreas,
Thanks for getting me to the starting line with this. I had the best luck when I downloaded the code as a ZIP file from your repository, and then
npm install
npm run dev
on that. I provided my login and password for Neo4j. Now I can run read and write queries.
I will work with this and provide feedback with what I learn.
Joe