{"id":20375104,"url":"https://github.com/hebertcisco/nestjs-techniques-undici","last_synced_at":"2025-03-04T21:26:29.208Z","repository":{"id":64162213,"uuid":"507699083","full_name":"hebertcisco/nestjs-techniques-undici","owner":"hebertcisco","description":"Undici module  example: https://github.com/hebertcisco/nestjs-undici","archived":false,"fork":false,"pushed_at":"2024-12-05T02:44:36.000Z","size":1504,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-15T07:03:45.354Z","etag":null,"topics":["nestjs","nestjs-boilerplate","nestjs-undici","typescript","undici"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hebertcisco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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},"funding":{"github":"hebertcisco","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2022-06-26T22:34:18.000Z","updated_at":"2024-12-05T02:44:39.000Z","dependencies_parsed_at":"2023-02-13T21:30:42.483Z","dependency_job_id":"5e33b279-5de2-491e-9bbe-4c84a0152f80","html_url":"https://github.com/hebertcisco/nestjs-techniques-undici","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hebertcisco%2Fnestjs-techniques-undici","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hebertcisco%2Fnestjs-techniques-undici/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hebertcisco%2Fnestjs-techniques-undici/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hebertcisco%2Fnestjs-techniques-undici/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hebertcisco","download_url":"https://codeload.github.com/hebertcisco/nestjs-techniques-undici/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241923955,"owners_count":20043114,"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":["nestjs","nestjs-boilerplate","nestjs-undici","typescript","undici"],"created_at":"2024-11-15T01:28:49.756Z","updated_at":"2025-03-04T21:26:29.181Z","avatar_url":"https://github.com/hebertcisco.png","language":"TypeScript","funding_links":["https://github.com/sponsors/hebertcisco"],"categories":[],"sub_categories":[],"readme":"[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/hebertcisco/nestjs-techniques-undici)\n\n[![🚀 Build](https://github.com/hebertcisco/nestjs-techniques-undici/actions/workflows/build.yml/badge.svg)](https://github.com/hebertcisco/nestjs-techniques-undici/actions/workflows/build.yml)\n\n# Basic documentation\n\n### Usage example:\n\n```ts\n// app.module.ts\nimport { Module } from '@nestjs/common';\nimport { HttpModule } from 'nestjs-undici';\n\nimport { AppController } from './app.controller';\nimport { AppService } from './app.service';\n\n@Module({\n    imports: [\n        HttpModule.register({\n            headers: {\n                'my-header': `foo-bar`,\n            },\n        }),\n    ],\n    controllers: [AppController],\n    providers: [AppService],\n})\nexport class AppModule {}\n```\n\n```ts\n// app.service.ts\nimport { lastValueFrom } from 'rxjs';\n\nimport { Injectable } from '@nestjs/common';\nimport { HttpService } from 'nestjs-undici';\n\n@Injectable()\nexport class AppService {\n    constructor(private httpService: HttpService) {}\n    public fetchExternalInfo = async () =\u003e {\n        const baseURL = 'https://api.github.com';\n        try {\n            const result = this.httpService.request(\n                `${baseURL}/repos/hebertcisco/undici`,\n            );\n\n            const response = await lastValueFrom(result);\n\n            return response.body.json();\n        } catch (error) {\n            throw error;\n        }\n    };\n}\n```\n\n## Runing the application with docker\n\n### Run as dev\n\n```sh\ndocker-compose up dev\n```\n\n### Run as prod\n\n```sh\ndocker-compose up -d prod\n```\n\n## Runing the application with npm scrips\n\n```sh\nnpm install \u0026\u0026 npm run build\n```\n\n```sh\nnpm run prepare:enviroment\n```\n\n### Run as dev\n\n```sh\nnpm run dev\n```\n\nor\n\n```sh\nnpm run dev:test\n```\n\n### Run as prod\n\n```sh\nnpm run start\n```\n\nor\n\n```sh\nnpm run start:prod\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhebertcisco%2Fnestjs-techniques-undici","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhebertcisco%2Fnestjs-techniques-undici","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhebertcisco%2Fnestjs-techniques-undici/lists"}