Skip to content

chqrd/nest-iracing-client

Repository files navigation

nest-iracing-client

This NestJS module adds an iRacing API client to your project.

Installation

import { ClientModule } from "@chqrd/nest-iracing-client";
import { Module } from "@nestjs/common";

@Module({
  imports: [
    ClientModule.registerAsync({
      imports: [ConfigModule],
      inject: [ConfigService],
      useFactory: async (config) => ({ redisUrl: config.getOrThrow("REDIS_URL", "redis://localhost:6379") }),
    }),
  ],
})
export class AppModule {}
@Injectable()
export class RequestService {
  constructor(private readonly client: ClientService) {}

  async doSomethingWithTheClient() {
    const client = await this.client.loadClient("myiracingaccount@example.com");
  }
}

Project setup

$ npm install

Compile and run the project

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

About

iRacing API client for NestJS

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages