Skip to content

Commit

Permalink
Merge pull request #93 from probot/two-repos
Browse files Browse the repository at this point in the history
Remove all smee.io files
  • Loading branch information
JasonEtco authored Apr 2, 2019
2 parents bd8dd8f + 4feab64 commit 8befccc
Show file tree
Hide file tree
Showing 46 changed files with 85 additions and 2,246 deletions.
8 changes: 1 addition & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,14 @@ node_js:
notifications:
disabled: true

env:
- TEST_DIR=client
- TEST_DIR=server

install:
- npm install -g codecov
- npm install --prefix client
- npm install --prefix server
- npm install

branches:
except:
- /^v\d+\.\d+\.\d+$/

script:
- cd $TEST_DIR
- npm test
- codecov
45 changes: 28 additions & 17 deletions README.md
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.
41 changes: 0 additions & 41 deletions client/README.md

This file was deleted.

44 changes: 0 additions & 44 deletions client/package.json

This file was deleted.

3 changes: 0 additions & 3 deletions client/test/__snapshots__/index.test.js.snap

This file was deleted.

102 changes: 0 additions & 102 deletions client/test/index.test.js

This file was deleted.

File renamed without changes.
43 changes: 40 additions & 3 deletions package.json
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"
]
}
}
27 changes: 0 additions & 27 deletions server/.babelrc

This file was deleted.

2 changes: 0 additions & 2 deletions server/.eslintignore

This file was deleted.

11 changes: 0 additions & 11 deletions server/.eslintrc

This file was deleted.

5 changes: 0 additions & 5 deletions server/index.js

This file was deleted.

19 changes: 0 additions & 19 deletions server/keep-alive.js

This file was deleted.

Loading

0 comments on commit 8befccc

Please sign in to comment.