Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arashsheyda/nuxt-neo4j
Effortlessly integrate Neo4j's powerful graph database into your Nuxt applications!
https://github.com/arashsheyda/nuxt-neo4j
devtools graph-database neo4j nuxt
Last synced: 1 day ago
JSON representation
Effortlessly integrate Neo4j's powerful graph database into your Nuxt applications!
- Host: GitHub
- URL: https://github.com/arashsheyda/nuxt-neo4j
- Owner: arashsheyda
- Created: 2024-03-08T20:42:10.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-06-26T19:31:50.000Z (5 months ago)
- Last Synced: 2024-10-29T23:43:58.178Z (15 days ago)
- Topics: devtools, graph-database, neo4j, nuxt
- Language: TypeScript
- Homepage: https://docs.arashsheyda.me/nuxt-neo4j
- Size: 319 KB
- Stars: 13
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
![nuxt-neo4j](https://raw.githubusercontent.com/arashsheyda/nuxt-neo4j/main/playground/public/social-card.jpg)
# Nuxt Neo4j
[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![License][license-src]][license-href]
[![Nuxt][nuxt-src]][nuxt-href]Effortlessly integrate [Neo4j](https://github.com/neo4j/neo4j) powerful graph database into your [Nuxt](https://github.com/nuxt/nuxt) applications!
- [✨ Release Notes](/CHANGELOG.md)
## Features
- **Effortless Integration**: Set up a database with just one line of configuration.
- **DevTools Support**: you will be able to access neo4j's workspace from Nuxt DevTools!
- **Easy to Use**: The module provides a `useDriver` function for easy interaction with the database.
- **Developer Experience**: this module is using the official `neo4j-driver` so it has full support of typescript.## Setup
1. Add `nuxt-neo4j` dependency to your project
```bash
npx nuxi@latest module add neo4j
```2. Add `nuxt-neo4j` to the `modules` section of `nuxt.config.ts`
```ts
export default defineNuxtConfig({
modules: [
'nuxt-neo4j',
],
})
```That's it! You can now use Nuxt Neo4j in your Nuxt app ✨
## Configuration
```ts
export default defineNuxtConfig({
neo4j: {
uri: 'string', // @default: process.env.NEO4J_URI
auth: {
type: 'string', // @default: 'basic'
username: 'string', // @default: process.env.NEO4J_USERNAME
password: 'string', // @default: process.env.NEO4J_PASSWORD
},
},
})
```## Usage
Once configured, you can start using the Neo4j driver provided by the module in your Nuxt application. Here's an [example](./playground/server/api/users.get.ts) of how to use it:
```ts
export default defineEventHandler(async () => {
const { records } = await useDriver().executeQuery('MATCH (q:User) RETURN q LIMIT 25;')
return records
})
```for more information please check [neo4j documentation](https://neo4j.com/docs/)
## Development
```bash
# Install dependencies
pnpm install# Generate type stubs
pnpm run dev:prepare# Develop with the playground
pnpm run dev# Build the playground
pnpm run dev:build# Run ESLint
pnpm run lint# Run Vitest
pnpm run test
pnpm run test:watch# Release new version
pnpm run release
```[npm-version-src]: https://img.shields.io/npm/v/nuxt-neo4j/latest.svg?style=flat&colorA=020420&colorB=00DC82
[npm-version-href]: https://npmjs.com/package/nuxt-neo4j[npm-downloads-src]: https://img.shields.io/npm/dm/nuxt-neo4j.svg?style=flat&colorA=020420&colorB=00DC82
[npm-downloads-href]: https://npmjs.com/package/nuxt-neo4j[license-src]: https://img.shields.io/npm/l/nuxt-neo4j.svg?style=flat&colorA=020420&colorB=00DC82
[license-href]: https://npmjs.com/package/nuxt-neo4j[nuxt-src]: https://img.shields.io/badge/Nuxt-020420?logo=nuxt.js
[nuxt-href]: https://nuxt.com