Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

egg-neo4j

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

egg-neo4j

Neo4J plugin for egg framework

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

egg-neo4j

NPM version build status David deps Known Vulnerabilities npm download

Neo4j for egg framework.

Install

$ npm i egg-neo4j --save

Usage

// {app_root}/config/plugin.js
exports.neo4j = {
  enable: true,
  package: 'egg-neo4j',
};

Configuration

// {app_root}/config/config.default.js
exports.neo4j = {
  client: {
    url: 'bolt://127.0.0.1',
    username: 'neo4j',
    password: 'admin',
  },
};

see config/config.default.js for more detail.

Example

Assume that we have User nodes in our database and we want to fetch all of them:

async function all() {
  const session = this.ctx.app.neo4j.session();

  try {
    const result = await session.run('MATCH(user:User) RETURN user');
    return result.records.map((item) => item.get('user').properties);
  } finally {
    session.close();
  }
}

Questions & Suggestions

Please open an issue here.

PRs welcome!

License

MIT

Keywords

FAQs

Package last updated on 20 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc