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

# Core

### Imports

{% tabs %}
{% tab title="Service" %}
```typescript
import { CoreService } from 'niro-health';
```
{% endtab %}

{% tab title="Module" %}
```typescript
import { CoreModule } from 'niro-health';
```
{% endtab %}
{% endtabs %}

### Method of Use

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

```typescript
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.

{% code title="app.service.ts" overflow="wrap" %}
```typescript
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);
  }
}
```
{% endcode %}

### 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

<table><thead><tr><th width="266.3333333333333">Method</th><th width="127" align="center">Scope</th><th>Description</th></tr></thead><tbody><tr><td><code>getClientGeoIP</code></td><td align="center"><code>public</code></td><td><code>Get client GeoIP.</code></td></tr><tr><td><code>getCookie</code></td><td align="center"><code>public</code></td><td><code>Get cookie by name.</code></td></tr></tbody></table>
