Download apps/server/src/app.module.ts from fukeke/rss: direct link, hf CLI and curl.
- Browser
- Download file 1.17 kB
-
https://huggingface.co/spaces/fukeke/rss/resolve/main/apps/server/src/app.module.ts
- Command line
-
hf download hf://spaces/fukeke/rss/apps/server/src/app.module.ts
-
curl -L -o app.module.ts https://huggingface.co/spaces/fukeke/rss/resolve/main/apps/server/src/app.module.ts
1.17 kB
| import { Module } from '@nestjs/common'; | |
| import { AppController } from './app.controller'; | |
| import { AppService } from './app.service'; | |
| import { TrpcModule } from '@server/trpc/trpc.module'; | |
| import { ConfigModule, ConfigService } from '@nestjs/config'; | |
| import configuration, { ConfigurationType } from './configuration'; | |
| import { ThrottlerModule } from '@nestjs/throttler'; | |
| import { ScheduleModule } from '@nestjs/schedule'; | |
| import { FeedsModule } from './feeds/feeds.module'; | |
| ({ | |
| imports: [ | |
| TrpcModule, | |
| FeedsModule, | |
| ScheduleModule.forRoot(), | |
| ConfigModule.forRoot({ | |
| isGlobal: true, | |
| envFilePath: ['.env.local', '.env'], | |
| load: [configuration], | |
| }), | |
| ThrottlerModule.forRootAsync({ | |
| imports: [ConfigModule], | |
| inject: [ConfigService], | |
| useFactory(config: ConfigService) { | |
| const throttler = | |
| config.get<ConfigurationType['throttler']>('throttler'); | |
| return [ | |
| { | |
| ttl: 60, | |
| limit: throttler?.maxRequestPerMinute || 60, | |
| }, | |
| ]; | |
| }, | |
| }), | |
| ], | |
| controllers: [AppController], | |
| providers: [AppService], | |
| }) | |
| export class AppModule {} | |