open-index/open-npm huggingface dataset:
npm package: @jitar-plugins/database
Description: This package provides plugins for integrating the [The Shelf database package](https://github.com/MaskingTechnology/theshelf/tree/main/packages/database) in Jitar applications.
Latest version: 0.1.3


# Database | Jitar Plugins

This package provides plugins for integrating the [The Shelf database package](https://github.com/MaskingTechnology/theshelf/tree/main/packages/database) in Jitar applications.

It contains a single health check for checking the database health.

## Installation

```bash
npm install @theshelf/database @jitar-plugins/database
```

## Usage

Follow the following steps to configure and use the provided health check.

### Step 1 - Configure the health check

```ts
// src/health/databaseHealthCheck.ts

import database from '@theshelf/database';
import { DatabaseHealthCheck } from '@jitar-plugins/database';

export default new DatabaseHealthCheck(database);
```

### Step 2 - Activate the health check

With the health check in place, it needs to be activated by registering it to the worker / standalone service.

```json
/* services/some-worker.json */
{
    "url": "http://example.com:3000",
    "healthChecks": [ /* add health checks here */
        "./health/databaseHealthCheck"
    ],
    "worker":
    {
        /* service configuration */
    }
}
```
npm package: @jitar-plugins/eventbroker
Description: This package provides plugins for integrating the [The Shelf event broker package](https://github.com/MaskingTechnology/theshelf/tree/main/packages/eventbroker) in Jitar applications.
Latest version: 0.1.3


# Event Broker | Jitar Plugins

This package provides plugins for integrating the [The Shelf event broker package](https://github.com/MaskingTechnology/theshelf/tree/main/packages/eventbroker) in Jitar applications.

It contains a single health check for checking the event broker health.

## Installation

```bash
npm install @theshelf/eventbroker @jitar-plugins/eventbroker
```

## Usage

Follow the following steps to configure and use the provided health check.

### Step 1 - Configure the health check

```ts
// src/health/eventBrokerHealthCheck.ts

import eventBroker from '@theshelf/eventbroker';
import { EventBrokerHealthCheck } from '@jitar-plugins/eventbroker';

export default new EventBrokerHealthCheck(eventBroker);
```

### Step 2 - Activate the health check

With the health check in place, it needs to be activated by registering it to the worker / standalone service.

```json
/* services/some-worker.json */
{
    "url": "http://example.com:3000",
    "healthChecks": [ /* add health checks here */
        "./health/eventBrokerHealthCheck"
    ],
    "worker":
    {
        /* service configuration */
    }
}
```
npm package: @jitar-plugins/filestore
Description: This package provides plugins for integrating the [The Shelf file store package](https://github.com/MaskingTechnology/theshelf/tree/main/packages/filestore) in Jitar applications.
Latest version: 0.1.3


# File Store | Jitar Plugins

This package provides plugins for integrating the [The Shelf file store package](https://github.com/MaskingTechnology/theshelf/tree/main/packages/filestore) in Jitar applications.

It contains a single health check for checking the file store health.

## Installation

```bash
npm install @theshelf/filestore @jitar-plugins/filestore
```

## Usage

Follow the following steps to configure and use the provided health check.

### Step 1 - Configure the health check

```ts
// src/health/fileStoreHealthCheck.ts

import fileStore from '@theshelf/filestore';
import { FileStoreHealthCheck } from '@jitar-plugins/filestore';

export default new FileStoreHealthCheck(fileStore);
```

### Step 2 - Activate the health check

With the health check in place, it needs to be activated by registering it to the worker / standalone service.

```json
/* services/some-worker.json */
{
    "url": "http://example.com:3000",
    "healthChecks": [ /* add health checks here */
        "./health/fileStoreHealthCheck"
    ],
    "worker":
    {
        /* service configuration */
    }
}
```
npm package: @jitar-plugins/http
Description: This package provides plugins for integrating the HTTP protocol in Jitar applications.
Latest version: 0.1.3


# HTTP | Jitar Plugins

This package provides plugins for integrating the HTTP protocol in Jitar applications.

It contains two types of middleware:

* **CORS** - configures cross-origin requests.
* **Origin** - ensures the avaiability of the origin header.

Both can be used indenpendently.

## Installation

```bash
npm install @jitar-plugins/http
```

## Usage

Follow the following steps to configure and use the middleware.

### Step 1 - Configure the middleware

**CORS**

```ts
// src/middleware/corsMiddleware.ts

import { CorsMiddleware } from '@jitar-plugins/http';

const origin = '*'; // allowed orgins (optional, default: *)
const headers = '*'; // allowed headers (optional, default: *)

export default new CorsMiddleware(origin, headers);
```

**Origin**

```ts
// src/middleware/originMiddleware.ts

import { OriginMiddleware } from '@jitar-plugins/http';

export default new OriginMiddleware(); // no configuration options
```

### Step 2 - Activate the middleware

With the health check in place, it needs to be activated by registering it to the proxy / standalone / worker service.

```json
/* services/proxy.json */
{
    "url": "http://example.com:3000",
    "middleware": [ /* add middleware here */
        "./middleware/corsMiddleware",
        "./middleware/originMiddleware"
    ],
    "proxy":
    {
        /* service configuration */
    }
}
```
npm package: @jitar-plugins/notification
Description: This package provides plugins for integrating the [The Shelf notification package](https://github.com/MaskingTechnology/theshelf/tree/main/packages/notification) in Jitar applications.
Latest version: 0.1.3


# Notification | Jitar Plugins

This package provides plugins for integrating the [The Shelf notification package](https://github.com/MaskingTechnology/theshelf/tree/main/packages/notification) in Jitar applications.

It contains a single health check for checking the file store health.

## Installation

```bash
npm install @theshelf/notification @jitar-plugins/notification
```

## Usage

Follow the following steps to configure and use the provided health check.

### Step 1 - Configure the health check

```ts
// src/health/notificationHealthCheck.ts

import notificationService from '@theshelf/notification';
import { NotificationHealthCheck } from '@jitar-plugins/notification';

export default new NotificationHealthCheck(notificationService);
```

### Step 2 - Activate the health check

With the health check in place, it needs to be activated by registering it to the worker / standalone service.

```json
/* services/some-worker.json */
{
    "url": "http://example.com:3000",
    "healthChecks": [ /* add health checks here */
        "./health/notificationHealthCheck"
    ],
    "worker":
    {
        /* service configuration */
    }
}
```