Vue & Neo4j

For those of you using Neo4j with VueJS, I have built a lightweight plugin that will allow you to connect directly to a Neo4j instance from within Vue components. Once connected, you can create sessions and run queries with the underlying official Neo4j/Javascript driver.

I've also added an API for Neo4j Desktop applications so you can quickly connect to the current active database.


Hi! Thank you so much for this awesome plugin! I've been enjoying the rapid development Vue.js + Neo4j provides a great deal. However, I'm not sure what my hosting options are and how to go about them, as my app is now mature enough to go live. Any suggestions? I'm partial to Heroku myself but can't seem to get the environment variables to work with the plugin.

1 Like

Hey Michael,

That's a good question. You could deploy neo4j on premise or your favourite cloud provider (you can download the Server version of Neo4j from the Download page or there are images for AWS/Google Cloud etc), or you could do a one-click installation and pay as you go using Neo4j Aura. How will your app be used?

1 Like

For now, it's a hobbyist project on a small scale to learn Neo4j and Vue.js together, probably with Flask at some point too, and hopefully develop into a bigger app in the future. I'm looking to get it hosted online in order to make sure nothing is horribly compromised for future production and to be able to have a few people use it. I mostly ran into configuration issues on heroku with their neo4j add on due to I think not really understanding how to modify what is passed into this.$neo4j.connect() outside of the use case of the local installation connected to Neo4j Desktop I have running.

What would you suggest for someone looking for a low cost to free option running small scale(which is why I was looking into Heroku, the add on has a free tier) and any advice on passing the proper values into connect()?

1 Like

I’m a big fan of Vue.js. Especially its simplicity as compared to Angular.js and React.

Thanks for creating this so we can combine two great technologies :+1: (Vue.js & Neo4j)


In that case I'd go for Neo4j Aura - all you need to do is enter some billing information, click a button and you get a neo4j instance with a url, username and password that you could use in this.$neo4j.connect() for now.

Long term a Flask API is a good way to go. The problem with connecting to neo4j from a front end application is that your database is completely public and you need to store credentials where they can be easily found (and therefore makes your app vulnerable). Putting an API layer between the application and neo4j protects you from that.

There's an example python/flask repo here that I put together a couple of years ago. It should be enough to get you going.


I am having the same problem now with heroku as staging environment. Did you find any production ready solution for neo4j database hosting apart from graphendb ?

you're absolutely right! that's what I was about to say. Connecting to the database on the front-end can be very dangerous for hackers like myself even if you hide your db credentials with .env files