-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #93 from probot/two-repos
Remove all smee.io files
- Loading branch information
Showing
46 changed files
with
85 additions
and
2,246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,42 @@ | ||
# smee · [![Build Status](https://img.shields.io/travis/probot/smee/master.svg)](https://travis-ci.org/probot/smee) [![Codecov](https://img.shields.io/codecov/c/github/probot/smee.svg)](https://codecov.io/gh/probot/smee/) | ||
<h2 align="center">smee-client</h2> | ||
<p align="center">Client and CLI for smee.io, a service that delivers webhooks to your local development environment.</p> | ||
<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> | ||
|
||
**smee** is a web application that receives payloads then sends them, via the [EventSource](https://developer.mozilla.org/en-US/docs/Web/API/EventSource) API, to other clients. | ||
<p align="center"><a href="https://github.com/probot/smee.io">Looking for <strong>probot/smee.io</strong>?</a></p> | ||
|
||
## How it works | ||
## Installation | ||
|
||
1. Go to https://smee.io/new, which will redirect you to a randomly generated channel. You must be using a browser that supports [Server-Sent Events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events). | ||
Install the client with: | ||
|
||
1. Use that new page's URL as your App's Webhook URL | ||
``` | ||
$ npm install -g smee-client | ||
``` | ||
|
||
## Usage | ||
|
||
1. Use the [client](./client) to proxy events and send them to a path on your local device, or set it as your Probot App's `WEBHOOK_PROXY_URL` environment variable. | ||
### CLI | ||
|
||
1. Watch events come in to the web UI | ||
The `smee` command will forward webhooks from smee.io to your local development environment. | ||
|
||
1. Profit! | ||
``` | ||
$ smee | ||
``` | ||
|
||
## Motivation | ||
Run `smee --help` for usage. | ||
|
||
One of the most cumbersome parts of building a GitHub App with [Probot](https://probot.github.io) is dealing with webhook deliveries. When working locally, for your app to receive webhooks you'd need to expose it to the internet - that's where we've used [localtunnel](https://localtunnel.me). However, it's not very reliable or fast and is more than many apps need to simply collect webhook events. | ||
### Node Client | ||
|
||
This also gave us a way to build our own UI around the needs of a Probot App. Together with the GitHub App UI, we now have a better way to get the full picture of what goes on in an app in development. | ||
```js | ||
const SmeeClient = require('smee-client') | ||
|
||
## Setup | ||
const smee = new SmeeClient({ | ||
source: 'https://smee.io/abc123', | ||
target: 'http://localhost:3000/events', | ||
logger: console | ||
}) | ||
|
||
``` | ||
# Install dependencies | ||
npm install | ||
const events = smee.start() | ||
|
||
# Run the server | ||
npm start | ||
// Stop forwarding events | ||
events.close() | ||
``` |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,44 @@ | ||
{ | ||
"private": true, | ||
"name": "smee-client", | ||
"version": "1.1.0", | ||
"description": "Client to proxy webhooks to local host", | ||
"main": "index.js", | ||
"bin": { | ||
"smee": "./bin/smee.js" | ||
}, | ||
"scripts": { | ||
"postinstall": "npm install --prefix server", | ||
"start": "npm start --prefix server" | ||
"test": "jest --coverage && standard" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/probot/smee.git" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/probot/smee/issues" | ||
}, | ||
"homepage": "https://github.com/probot/smee#readme", | ||
"dependencies": { | ||
"commander": "^2.19.0", | ||
"eventsource": "^1.0.7", | ||
"morgan": "^1.9.1", | ||
"superagent": "^5.0.2", | ||
"validator": "^10.11.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.4.0", | ||
"babel-core": "^7.0.0-bridge.0", | ||
"babel-jest": "^24.5.0", | ||
"connect-sse": "^1.2.0", | ||
"jest": "^24.5.0", | ||
"nock": "^10.0.6", | ||
"standard": "^12.0.1", | ||
"supertest": "^4.0.2" | ||
}, | ||
"standard": { | ||
"env": [ | ||
"jest" | ||
] | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.