Download Reactive-Resume/apps/server/src/storage/storage.module.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.04 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/Reactive-Resume/apps/server/src/storage/storage.module.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@f5071caa249115f3b590492f1c8eb471e02aae4b/Reactive-Resume/apps/server/src/storage/storage.module.ts
-
curl -L -o storage.module.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/Reactive-Resume/apps/server/src/storage/storage.module.ts
1.04 kB
| import { Module } from "@nestjs/common"; | |
| import { ConfigService } from "@nestjs/config"; | |
| import type {} from "multer"; | |
| import { MinioModule } from "nestjs-minio-client"; | |
| import { Config } from "../config/schema"; | |
| import { StorageController } from "./storage.controller"; | |
| import { StorageService } from "./storage.service"; | |
| ({ | |
| imports: [ | |
| MinioModule.registerAsync({ | |
| inject: [ConfigService], | |
| useFactory: (configService: ConfigService<Config>) => ({ | |
| endPoint: configService.getOrThrow<string>("STORAGE_ENDPOINT"), | |
| port: configService.getOrThrow<number>("STORAGE_PORT"), | |
| region: configService.get<string>("STORAGE_REGION"), | |
| accessKey: configService.getOrThrow<string>("STORAGE_ACCESS_KEY"), | |
| secretKey: configService.getOrThrow<string>("STORAGE_SECRET_KEY"), | |
| useSSL: configService.getOrThrow<boolean>("STORAGE_USE_SSL"), | |
| }), | |
| }), | |
| ], | |
| controllers: [StorageController], | |
| providers: [StorageService], | |
| exports: [StorageService], | |
| }) | |
| export class StorageModule {} | |