# pub-sub-seeder

> Simple seeder for pub-sub

Latest version **1.0.7** (published 2021-08-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install pub-sub-seeder
pnpm add pub-sub-seeder
yarn add pub-sub-seeder
bun add pub-sub-seeder
```

Provides the command `pub-sub-seed`.

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.7 |
| Published | 2021-08-19 |
| First published | 2021-08-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Kamil Fronczak |
| Maintainers | axotion |
| Keywords | simple-pubsub, pub-sub, google, google-pub-sub, pubsub, seeder |

## Links

- npm: https://www.npmjs.com/package/pub-sub-seeder
- npm.io page: https://npm.io/package/pub-sub-seeder

## Dependencies (1)

- [@google-cloud/pubsub](https://npm.io/package/@google-cloud/pubsub.md) ^2.16.6

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 1.0.7 (latest) — 2021-08-19
- 1.0.6 — 2021-08-19
- 1.0.5 — 2021-08-19
- 1.0.4 — 2021-08-19
- 1.0.3 — 2021-08-19
- 1.0.2 — 2021-08-19
- 1.0.1 — 2021-08-19
- 1.0.0 — 2021-08-19

## README

# PubSub Seeder
### PubSub Seeder written in JS as CLI command for extreme convenience usage

![alt text](https://s5.gifyu.com/images/2021-08-19-22.44.40.gif "Title")


## Install

```
npm install pub-sub-seeder 
```
OR globally
```
npm install -g pub-sub-seeder
```

### Optionally

```
gcloud components install pubsub-emulator
```

## Required envs


### For emulator
```
export PUBSUB_PROJECT_ID=test
export PUBSUB_EMULATOR_HOST=localhost:8085
```

### For GCP pub-sub 
```
export PUBSUB_PROJECT_ID=test
export PUBSUB_CLIENT_EMAIL=
export PUBSUB_PRIVATE_KEY=
```
## Usage

```
./node_modules_location/pub-sub-seeder/bin/seed.js topic-subs.json
```
or if installed globally
```
pub-sub-seed topic-subs.json

```

## Example file



```json

[
    {
      "topic": "Topic1",
      "subscriptions": ["SubForTopic1"]
    }, 
    {
      "topic": "Topic2",
      "subscriptions": ["SubForTopic2", "SecondSubForTopic2"]
    }
]

```

---
_Source: https://npm.io/package/pub-sub-seeder · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
