📝Core

The module that provides methods for get client GeoIP and cookie.

Imports

import { CoreService } from 'niro-health';

Method of Use

To use this module, you need to inject it into the desired service.

import { Module } from '@nestjs/common';
import { CoreService } from 'niro-health';
import { AppController } from './app.controller';
import { AppService } from './app.service';

@Module({
  controllers: [AppController],
  providers: [AppService, CoreService],
})
export class AppModule {}

Importing the service inside the module.

app.service.ts
import { Injectable } from '@nestjs/common';
import { CoreService } from 'niro-health';

@Injectable()
export class AppService {
  constructor(private readonly coreService: CoreService) {}

  getClientGeoIP(request: Express.Request) {
    return this.coreService.getClientGeoIP(request);
  }
}

Without dependencies

You won't need to connect the pieces with any other module.

Extensibility

In this module, you will find contracts, types, modules, and other resources used by other modules.

Methods

Method
Scope
Description

getClientGeoIP

public

Get client GeoIP.

getCookie

public

Get cookie by name.

Last updated