# @growsari/sls-event-gateway-subscriber

> Serverless Plugin for Growsari Event Gateway Subscription

Latest version **0.0.3** (published 2019-10-30) · 0 weekly downloads

## Install

```sh
npm install @growsari/sls-event-gateway-subscriber
pnpm add @growsari/sls-event-gateway-subscriber
yarn add @growsari/sls-event-gateway-subscriber
bun add @growsari/sls-event-gateway-subscriber
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2019-10-30 |
| First published | 2019-10-30 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 3.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | gs.dwight.badua, leland.growsari, melyo, prasad.riktam |

## Links

- npm: https://www.npmjs.com/package/@growsari/sls-event-gateway-subscriber
- npm.io page: https://npm.io/package/@growsari/sls-event-gateway-subscriber

## Dependencies (2)

- [lodash](https://npm.io/package/lodash.md) ^4.17.15
- [@growsari/event-gateway-client](https://npm.io/package/@growsari/event-gateway-client.md) ^1.0.2

## Recent versions

- 0.0.3 (latest) — 2019-10-30
- 0.0.2 — 2019-10-30
- 0.0.1 — 2019-10-30

## README

# Serverless Plugin - Event Gateway Subscriber

This Serverless Framework plugin will configure API Gateway connected Lambdas to subscribe to topics in the Growsari Event Bus

## Installation

`npm install --save @growsari/sls-event-gateway-subscriber`

## Enviroment Configuration

`EVENT_GATEWAY_URL` - Base URL of the Growsari Event Bus

## Usage

To use the plugin, add the following configurations in `serverless.yml` 
- Include the package in the `plugins`
- Add `event_gateway` as an event trigger for a function.
- Add `topic` as a topic name for the `event_gateway` event

```yml

# serverless.yml

service:  serviceName

provider:
  name:  aws
  runtime:  nodejs10.x

# Add package in plugins
plugins:
  -  "@growsari/sls-event-gateway-subscriber"

functions:
  notificationUrlforTopicName:
    handler: handler.process
    events:
      # Make sure an http event with a POST method is present
      - http:
          path: notify
          method: post
      # Add event_gateway as an event and a topic to subscribe to
      - event_gateway:
          topic:  topicName
```

---
_Source: https://npm.io/package/@growsari/sls-event-gateway-subscriber · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
