Developer Guides Getting Started Getting Started What is a Graph Database? Intro to Graph DBs Video Series Concepts: RDBMS to Graph Concepts: NoSQL to Graph Getting Started Resources Neo4j Graph Platform Graph Platform Overview Neo4j Database Neo4j Desktop Intro Neo4j… Read more →
Deploying a GRANDstack application to Aura
In this page, we will learn how to build and deploy a GRANDstack application with Neo4j Aura.
We should have created and started a Neo4j Aura database instance. If we have not already, we can follow the instructions in the getting started guide to step through the process. We should also be familiar with the GRANDstack.
Now that we’ve created our Neo4j Aura database, we’re going to learn how to deploy a GRANDstack application that queries data stored in that database.
We’re going to use the Neo4j Cloud Tool to import our data, so let’s see how to set up that application.
We can install that directly via this link, or if that doesn’t work we can paste the following URL into the
Graph App URL field on the Graph Applications menu:
Once we do that we’ll see the following prompt:
We can now launch the Neo4j Cloud Tool, which will take us to the following screen:
We’re going to use the Neo4j Cloud tool to import this dataset.
Click on the
Check existing database button.
This will check whether our Aura database contains existing data.
Assuming an empty database, we’ll see the following screen:
Clicking on the
Next button will take us to the following screen:
From here we can import databases or a dump file. We’ll be using the latter functionality to import a dump containing the football transfers database.
The dump file can be downloaded from aura-datasets.s3.amazonaws.com/football-transfers.dump.
Once we’ve downloaded that file we’ll select it as the dump file to import.
After that we’ll click on the
Import Dump file button.
This will take a few minutes to run, but eventually we’ll see output similar to the following:
Click on the
View data in Neo4j Browser button to see what we’ve imported.
The diagram below shows a sample of the imported graph:
Let’s have a look at the GRANDstack application that we’re going to deploy. The application is a football transfers one built on top of the graph that we imported in the previous step. See Football Transfers Graph App with the GRANDstack Starter Kit to learn more about the application itself.
The following command will clone the football transfers project locally:
The application has two parts:
API – this code powers a GraphQL API on top of our Neo4j database, and lives in the
UI – the
uidirectory contains a React application that renders data extracted from the GraphQL API.
The diagram below shows the architecture of our application and how it interacts with Neo4j:
We’re going to deploy the application using ZEIT, a cloud platform for websites and serverless APIS.
First we’ll need to create an account on that platform via zeit.co/signup.
Once we’ve done that we can install the Now CLI on our machine using instructions from zeit.co/download:
Now let’s login to ZEIT using the Now CLI tool:
If we run that, we’ll see the following output:
Once we’ve entered our credentials we’ll receive an email which will contain a link that we need to click to verify that we want to login. The console will then be updated with the following message:
Now we’re ready to tell ZEIT about our database credentials. We’ll need to provide the following details:
- Bolt URL
If we open our Neo4j Aura Console Dashboard, we’ll see a list of our databases.
We’ll need to use the Bolt URL, so let’s copy that onto our clipboard:
The default username is
neo4j and the default password is generated on database creation.
For the database described above we’d have the following credentials:
Bolt URL –
We can run the following commands to add these credentials as ZEIT secrets.
Don’t forget to change the credentials below to match those of your own Aura database. Copy and pasting the credentials below won’t work as that database has long since been destroyed!
We’re now ready to deploy our application, which we can do by executing the following command:
Running this command will result in the following output:
We can then navigate to the provided URL, which in this case is
Once this page has loaded, we’ll see a list of the top transfers:
We can navigate to other screens via the left menu:
My favourite one is
Country Money Flow, so let’s have a look at that: