npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@iammhc/nestjs-neo4j

v1.0.1

Published

Neo4j driver for Nest Framework.

Downloads

11

Readme

Neo4j for NestJS

codecov npm GitHub Workflow Status GitHub Snyk Vulnerabilities for GitHub Repo GitHub package.json dependency version (prod) Quality Gate Status Neo4j driver for Nest Framework.

What's New GitHub release (latest by date)

Installation

$ npm i --save @iammhc/nestjs-neo4j

or

$ yarn add @iammhc/nestjs-neo4j

Usage

import { Neo4jModule, Neo4jModuleConfig } from '@iammhc/nestjs-neo4j';

Configuration

    imports: [
      Neo4jModule.forRoot({
          host: 'localhost',
          password: '',
          port: 34498,
          scheme: 'bolt',
          username: 'neo4j',
        }),
    ],

Async Configuration

When you need to set Neo4jModule options asynchronously instead of statically, use the forRootAsync() method. As with most dynamic modules, Nest provides several techniques to deal with async configuration.

One technique is to use a factory function:

Like other factory providers, our factory function can be async and can inject dependencies through inject.

    imports: [
      Neo4jModule.forRootAsync({
        imports: [ConfigModule],
        inject: [ConfigService],
        useFactory: (configService: ConfigService): Neo4jModuleConfig => ({
          host: configService.get('NEO4J_HOST'),
          password: configService.get('NEO4J_PASSWORD'),
          port: configService.get('NEO4J_PORT'),
          scheme: configService.get('NEO4J_SCHEME'),
          username: configService.get('NEO4J_USERNAME'),
        }),
      }),
    ],

Usage examples

  import { Neo4jService } from '@iammhc/nestjs-neo4j';

  constructor(private readonly neo4jService: Neo4jService) {}

  example():Neo4jModuleConfig {
    return this.neo4jService.getConfig();
  }

| function | Description | Argument | | --------------------- | -------------------------- | -------------------------------------- | | getConfig | Config Detail of neo4j | None | | getDriver | Neo4j Driver | None | | getReadSession | Get Read Session of Neo4j | getReadSession('database?') | | getWriteSession | Get Write Session of Neo4j | getWriteSession('database?') | | read | Use for Read Data | read('cypher','params','database?') | | write | Use for write Data | write('cypher','params','database?') |

Stay in touch

GitHub followers Twitter Follow

License

Package is MIT licensed.