solapi-nestjs
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

SOLAPI Module for NestJS

SOLAPI module for Nest.

Installation

yarn add solapi-nestjs

Usage

See docs about usage of SOLAPI.

After the installation process is complete, you can import the SolapiModule using static register() method.

import { Module } from '@nestjs/common';
import { AppService } from './app.service';
import { AppController } from './app.controller';
import { SolapiModule } from 'solapi-nestjs';

@Module({
  imports: [
    SolapiModule.register({
      key: "Your API Key",
      secret: "Your API Secret"
    }),
  ],
  controllers: [AppController],
  providers: [AppService]
})
export class AppModule {}

You can use SolapiService provider using Dependency injection.

import { Injectable } from '@nestjs/common';
import { SolapiService } from 'solapi-nestjs';

@Injectable()
export class AuthService {
  constructor(
    private readonly solapiService: SolapiService,
  ) {}
  
  (...)
}

Readme

Keywords

none

Package Sidebar

Install

npm i solapi-nestjs

Weekly Downloads

3

Version

0.1.0

License

MIT

Unpacked Size

8.3 kB

Total Files

12

Last publish

Collaborators

  • onehunnitconst