{"id":19016260,"url":"https://github.com/diy0r/nestjs-file-graph","last_synced_at":"2025-04-23T02:41:18.107Z","repository":{"id":257803844,"uuid":"861274375","full_name":"DIY0R/nestjs-file-graph","owner":"DIY0R","description":"NestJS File-Graph Wrapper","archived":false,"fork":false,"pushed_at":"2025-03-26T21:52:02.000Z","size":1336,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-22T00:12:07.961Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/nestjs-file-graph","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DIY0R.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-22T13:21:04.000Z","updated_at":"2025-03-26T10:13:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"6921ea9a-2532-4107-a514-370d134847f8","html_url":"https://github.com/DIY0R/nestjs-file-graph","commit_stats":null,"previous_names":["diy0r/nestjs-file-graph"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DIY0R%2Fnestjs-file-graph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DIY0R%2Fnestjs-file-graph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DIY0R%2Fnestjs-file-graph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DIY0R%2Fnestjs-file-graph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DIY0R","download_url":"https://codeload.github.com/DIY0R/nestjs-file-graph/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250360211,"owners_count":21417716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T19:42:15.988Z","updated_at":"2025-04-23T02:41:18.068Z","avatar_url":"https://github.com/DIY0R.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NestJS File-Graph Wrapper\r\n\r\nThis package provides a wrapper for integrating the [file-graph](https://www.npmjs.com/package/file-graph) library with NestJS.\r\n\r\n## Installation\r\n\r\nTo install this package, use npm:\r\n\r\n```bash\r\nnpm install nestjs-file-graph\r\n```\r\n\r\n## Module Setup\r\n\r\nTo set up the `nestjs-file-graph` library in your NestJS project, follow these steps:\r\n\r\n1. Import `NestjsFileGraph` into your module:\r\n\r\n```typescript\r\nimport { Module } from '@nestjs/common';\r\nimport { NestjsFileGraph } from 'nestjs-file-graph';\r\n\r\n@Module({\r\n  imports: [NestjsFileGraph.forRoot('graph.txt')],\r\n})\r\nexport class AppModule {}\r\n```\r\n\r\nReplace `'graph.txt'` with the path to your file where graph data will be stored.\r\n\r\n## Using the Service\r\n\r\nAfter setting up the module, you can use the `FileGraphService` in your controller or service. Here’s an example of usage:\r\n\r\n```typescript\r\nimport { Controller, Get } from '@nestjs/common';\r\nimport { FileGraphService } from 'nestjs-file-graph';\r\n\r\n@Controller('cats')\r\nexport class CatsController {\r\n  constructor(private readonly fileGraphService: FileGraphService) {}\r\n\r\n  @Get()\r\n  async createAndFindVertex() {\r\n    const data = { name: 'Diy0r', city: 'LA' };\r\n    const createdVertex = await this.fileGraphService.createVertex(data);\r\n    const foundVertex = await this.fileGraphService.findOne(vertex =\u003e vertex.id === createdVertex.id);\r\n    return foundVertex;\r\n  }\r\n}\r\n```\r\n## Documentation\r\n\r\nFor detailed documentation on all methods and usage of the [file-graph](https://www.npmjs.com/package/file-graph) library !\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiy0r%2Fnestjs-file-graph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiy0r%2Fnestjs-file-graph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiy0r%2Fnestjs-file-graph/lists"}