Installation

This guide shows how to start using Cypher® Builder by setting up a Node.js project with @neo4j/cypher-builder.

Requirements

  • Node.js 16.0.0 or greater

  • npm

  • [Optional] A Neo4j database to try Cypher queries.

Instructions

  1. In a folder of your choice, run the following command to create a Node.js project and a package.json file:

    npm init es6 -y

    Note that these examples use ES6 modules, but CommonJS modules can be used as well.

  2. Install @neo4j/cypher-builder and add it to the dependencies list with the following command:

    npm install --save @neo4j/cypher-builder
  3. Create a new file main.js with the following content:

    import Cypher from "@neo4j/cypher-builder";
  4. Execute the script:

    node main.js

    At this point, the script should not do anything, but if it doesn’t show an error it means Cypher Builder has been correctly installed.