Exploring the Project

The challenges in this course use a service called GitPod to issue code challenges. We have chosen Gitpod because it means that you can complete the course directly in your browser without having to download or install any additional software.

To use GitPod you must sign in with your GitLab, GitHub or Bitbucket account.

Explore the Repository

You can open the repository by clicking the link below:

Explore Repository in GitPod →

Here are some of the important directories in the project:

  • example/ - Example code for driver instantiation.

  • src/ - The application code:

    • middleware/ - Some custom middleware functions that are used by Express including generic error handling.

    • passport/ - Logic required for user authentication.

    • routes/ - Route handlers that are registered on the server. You shouldn’t need to edit these files.

    • services/ - Services that you will need to update to interact with Neo4j.

  • test/ - Test files that will you will need to run in order to pass the test. You will run these using the npm run test or yarn run test command.

  • public/ - Minified build files for the SPA. Do not edit these files.

Course Challenges

For each challenge, you will be provided with a link to re-open the correct file within the repository. Clicking these links will also set the credentials load environment variables for your Neo4j Sandbox instance.

Your Sandbox Instance

As part of this course, a Neo4j Sandbox instance has been created for you with the recommendations dataset. This dataset contains all of the details required to populate the Neoflix website.

What is Neo4j Sandbox?

Neo4j Sandbox is a free service that allows you to create pre-populated Neo4j instances completely free of charge. Neo4j Sandbox is the perfect environment for experimenting with Neo4j.

You can log into Neo4j Sandbox and create a database with a number of pre-populated datasets by visiting sandbox.neo4j.com.

Extending Your Sandbox Instance

By default, a Neo4j sandbox instance exists for 3 days. You can extend it for another 7 days by going to the sandbox site and extending it in the details (right-most down arrow) for the recommendations sandbox.

How to extend your Neo4j Sandbox instance

Accessing Your Sandbox Credentials

Your sandbox credentials can be accessed within the project through the process.env variable.

js
Accessing Environment Variables
const {
  NEO4J_URI,
  NEO4J_USERNAME,
  NEO4J_PASSWORD,
} = process.env

Running The Project Locally

You can also run this project locally by cloning the repository. To configure your Neo4j Sandbox connection, rename the .env.example file in the root folder to .env and replace the NEO4J_ variables with the values below.

env
env
NEO4J_URI=bolt://{sandbox-ip}:{sandbox-boltPort}
NEO4J_USERNAME={sandbox-username}
NEO4J_PASSWORD={sandbox-password}

Done!

Once you are ready, click the button below to complete this lesson.

Lesson Summary

You now have a project setup and running with dummy data, and you have added your sandbox configuration details to the environment variables. You should now be ready to go.

In the next module, you will learn about the Neo4j en Driver.