1 | <h2 align="center">smee-client</h2>
|
2 | <p align="center">Client and CLI for smee.io, a service that delivers webhooks to your local development environment.</p>
|
3 | <p align="center"><a href="https://npmjs.com/package/smee-client"><img src="https://img.shields.io/npm/v/smee-client/latest.svg" alt="NPM"></a> <a href="https://travis-ci.com/probot/smee-client"><img src="https://badgen.now.sh/travis/probot/smee-client" alt="Build Status"></a> <a href="https://codecov.io/gh/probot/smee-client/"><img src="https://badgen.now.sh/codecov/c/github/probot/smee-client" alt="Codecov"></a></p>
|
4 |
|
5 | <p align="center"><a href="https://github.com/probot/smee.io">Looking for <strong>probot/smee.io</strong>?</a></p>
|
6 |
|
7 | ## Installation
|
8 |
|
9 | Install the client with:
|
10 |
|
11 | ```sh
|
12 | npm install -g smee-client
|
13 | ```
|
14 |
|
15 | ## Usage
|
16 |
|
17 | ### CLI
|
18 |
|
19 | The `smee` command will forward webhooks from smee.io to your local development environment.
|
20 |
|
21 | ```sh
|
22 | smee
|
23 | ```
|
24 |
|
25 | Run `smee --help` for usage.
|
26 |
|
27 | ### Node Client
|
28 |
|
29 | ```js
|
30 | const SmeeClient = require('smee-client')
|
31 |
|
32 | const smee = new SmeeClient({
|
33 | source: 'https://smee.io/abc123',
|
34 | target: 'http://localhost:3000/events',
|
35 | logger: console
|
36 | })
|
37 |
|
38 | const events = smee.start()
|
39 |
|
40 | // Stop forwarding events
|
41 | events.close()
|
42 | ```
|