From 94684993c4361f7887aca2d0e3c336708229e131 Mon Sep 17 00:00:00 2001 From: Aaron Meese Date: Mon, 31 Oct 2022 19:29:57 -0400 Subject: [PATCH] Adds ES6 import documentation --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 249defbff..b6a3bb9c8 100644 --- a/README.md +++ b/README.md @@ -37,10 +37,18 @@ npm install neo4j-driver@next Please note that `@next` only points to pre-releases that are not suitable for production use. To get the latest stable release omit `@next` part altogether or use `@latest` instead. +To use `neo4j` with Common JS, use the `require` syntax: + ```javascript var neo4j = require('neo4j-driver') ``` +If you are using ES6, use the `import` syntax: + +```javascript +import neo4j from 'neo4j-driver' +``` + Driver instance should be closed when Node.js application exits: ```javascript