Listory/src/sources/spotify/spotify-auth/spotify-auth.module.ts

20 lines
540 B
TypeScript
Raw Normal View History

2021-08-12 14:02:36 +00:00
import { HttpModule } from "@nestjs/axios";
import { Module } from "@nestjs/common";
2020-05-03 03:47:24 +02:00
import { ConfigService } from "@nestjs/config";
2020-02-02 19:21:58 +01:00
import { SpotifyAuthService } from "./spotify-auth.service";
@Module({
imports: [
HttpModule.registerAsync({
2020-05-03 03:47:24 +02:00
useFactory: (config: ConfigService) => ({
2020-02-02 19:21:58 +01:00
timeout: 5000,
2020-05-03 03:47:24 +02:00
baseURL: config.get<string>("SPOTIFY_AUTH_API_URL"),
2020-05-02 17:17:20 +02:00
}),
2020-05-03 03:47:24 +02:00
inject: [ConfigService],
2020-05-02 17:17:20 +02:00
}),
2020-02-02 19:21:58 +01:00
],
providers: [SpotifyAuthService],
2020-05-02 17:17:20 +02:00
exports: [SpotifyAuthService],
2020-02-02 19:21:58 +01:00
})
export class SpotifyAuthModule {}