UNPKG

1.21 kBMarkdownView Raw
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
9Install the client with:
10
11```sh
12npm install -g smee-client
13```
14
15## Usage
16
17### CLI
18
19The `smee` command will forward webhooks from smee.io to your local development environment.
20
21```sh
22smee
23```
24
25Run `smee --help` for usage.
26
27### Node Client
28
29```js
30const SmeeClient = require('smee-client')
31
32const smee = new SmeeClient({
33 source: 'https://smee.io/abc123',
34 target: 'http://localhost:3000/events',
35 logger: console
36})
37
38const events = smee.start()
39
40// Stop forwarding events
41events.close()
42```