Skip to content
This repository has been archived by the owner on Jul 11, 2019. It is now read-only.

Commit

Permalink
Merge pull request #3 from moose-team/cli
Browse files Browse the repository at this point in the history
experimental release
  • Loading branch information
ungoldman committed Apr 30, 2015
2 parents eed1362 + e6075f8 commit b787e2f
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 17 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## Unreleased
* engage
## 0.1.0
* experimental release
45 changes: 38 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,59 @@
# peerbot

[![npm][npm-image]][npm-url]
[![travis][travis-image]][travis-url]

[npm-image]: https://img.shields.io/npm/v/peerbot.svg?style=flat-square
[npm-url]: https://www.npmjs.com/npm/peerbot
[travis-image]: https://img.shields.io/travis/moose-team/peerbot.svg?style=flat-square
[travis-url]: https://travis-ci.org/moose-team/peerbot

Message seeding utility for [friends](https://github.com/moose-team/friends) p2p chat.

:construction: WORK IN PROGRESS :construction:
Run this on a server to ensure that there will always be a peer available to connect to for a given channel on friends.

Run this locally or on a server to ensure that there will always be a peer available to connect to for a channel.
## Install

:warning: Probably broken! Fixes welcome.
```
npm install -g peerbot
```

### Requirements

1. Use newest io.js and npm ((`>= 1.8.1`, `>= 2.8.3`).
2. Install `electron-prebuilt` & `electron-spawn` globally.

## Usage

:warning: Hefty downloads ahead!
```
peerbot
```

`peerbot` always seeds the `#friends` channel. Pass `--channel=mychannel` to also seed another channel.

```
peerbot --channel=cats
```

You can specify as many channels as you want with multiple `--channel` flags.

### Running on headless Ubuntu

If you're running `peerbot` on headless Ubuntu, you will need to use `xvfb-run` to create a virtual display so that Chromium can run:

```
$ sudo apt-get install xvfb
$ xvfb-run peerbot
```

Also you [may need to `apt-get install libgconf-2-4`](https://github.com/atom/electron/issues/1518)

Ideas and contributions for a better implementation are welcome.
## Build and develop locally

for now...
Same requirements as in [Install](#install).

```
git clone [email protected]:ngoldman/peerbot.git
git clone [email protected]:moose-team/peerbot.git
cd peerbot
npm install
npm run rebuild-leveldb
Expand Down
7 changes: 7 additions & 0 deletions bin/cli.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env node

process.chdir(__dirname + '/../')

var exec = require('shelljs').exec

exec('electron-spawn . $@')
19 changes: 11 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"name": "peerbot",
"description": "Message seeding utility for friends p2p chat.",
"version": "1.0.0",
"version": "0.1.0",
"author": "MOOSE Team",
"bin": {
"peerbot": "./bin/cli.js"
},
"bugs": {
"url": "https://github.com/ngoldman/peerbot/issues"
"url": "https://github.com/moose-team/peerbot/issues"
},
"dependencies": {
"electron-prebuilt": "^0.25.1",
"electron-spawn": "^2.0.1",
"end-of-stream": "^1.1.0",
"ghsign": "^1.2.2",
"hyperlog": "^3.3.1",
Expand All @@ -18,6 +19,7 @@
"node-gyp": "^1.0.3",
"protocol-buffers": "^3.0.0",
"request": "^2.55.0",
"shelljs": "^0.4.0",
"signalhub": "^3.3.0",
"silence-chromium": "^1.1.0",
"single-line-log": "^0.4.1",
Expand All @@ -28,7 +30,7 @@
"devDependencies": {
"standard": "^3.2.1"
},
"homepage": "https://github.com/ngoldman/peerbot",
"homepage": "https://github.com/moose-team/peerbot",
"keywords": [
"bot",
"chat",
Expand All @@ -49,11 +51,12 @@
"main": "index.js",
"repository": {
"type": "git",
"url": "https://github.com/ngoldman/peerbot.git"
"url": "https://github.com/moose-team/peerbot.git"
},
"scripts": {
"rebuild-leveldb": "cd node_modules/leveldown && HOME=~/.electron-gyp node-gyp rebuild --target=0.25.1 --arch=x64 --dist-url=https://atom.io/download/atom-shell",
"start": "electron-spawn . --channel=friends",
"postinstall": "npm run rebuild-leveldb",
"rebuild-leveldb": "cd node_modules/leveldown && set HOME=~/.electron-gyp && node-gyp rebuild --target=0.25.1 --arch=x64 --dist-url=https://atom.io/download/atom-shell",
"start": "electron-spawn .",
"test": "standard"
}
}

0 comments on commit b787e2f

Please sign in to comment.