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

Commit b787e2f

Browse files
committed
Merge pull request #3 from moose-team/cli
experimental release
2 parents eed1362 + e6075f8 commit b787e2f

File tree

4 files changed

+58
-17
lines changed

4 files changed

+58
-17
lines changed

CHANGELOG.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
All notable changes to this project will be documented in this file.
44
This project adheres to [Semantic Versioning](http://semver.org/).
55

6-
## Unreleased
7-
* engage
6+
## 0.1.0
7+
* experimental release

README.md

+38-7
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,59 @@
11
# peerbot
22

3+
[![npm][npm-image]][npm-url]
34
[![travis][travis-image]][travis-url]
45

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

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

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

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

14-
:warning: Probably broken! Fixes welcome.
17+
```
18+
npm install -g peerbot
19+
```
20+
21+
### Requirements
22+
23+
1. Use newest io.js and npm ((`>= 1.8.1`, `>= 2.8.3`).
24+
2. Install `electron-prebuilt` & `electron-spawn` globally.
1525

1626
## Usage
1727

18-
:warning: Hefty downloads ahead!
28+
```
29+
peerbot
30+
```
31+
32+
`peerbot` always seeds the `#friends` channel. Pass `--channel=mychannel` to also seed another channel.
33+
34+
```
35+
peerbot --channel=cats
36+
```
37+
38+
You can specify as many channels as you want with multiple `--channel` flags.
39+
40+
### Running on headless Ubuntu
41+
42+
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:
43+
44+
```
45+
$ sudo apt-get install xvfb
46+
$ xvfb-run peerbot
47+
```
48+
49+
Also you [may need to `apt-get install libgconf-2-4`](https://github.com/atom/electron/issues/1518)
1950

20-
Ideas and contributions for a better implementation are welcome.
51+
## Build and develop locally
2152

22-
for now...
53+
Same requirements as in [Install](#install).
2354

2455
```
25-
git clone [email protected]:ngoldman/peerbot.git
56+
git clone [email protected]:moose-team/peerbot.git
2657
cd peerbot
2758
npm install
2859
npm run rebuild-leveldb

bin/cli.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env node
2+
3+
process.chdir(__dirname + '/../')
4+
5+
var exec = require('shelljs').exec
6+
7+
exec('electron-spawn . $@')

package.json

+11-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
{
22
"name": "peerbot",
33
"description": "Message seeding utility for friends p2p chat.",
4-
"version": "1.0.0",
4+
"version": "0.1.0",
55
"author": "MOOSE Team",
6+
"bin": {
7+
"peerbot": "./bin/cli.js"
8+
},
69
"bugs": {
7-
"url": "https://github.com/ngoldman/peerbot/issues"
10+
"url": "https://github.com/moose-team/peerbot/issues"
811
},
912
"dependencies": {
10-
"electron-prebuilt": "^0.25.1",
11-
"electron-spawn": "^2.0.1",
1213
"end-of-stream": "^1.1.0",
1314
"ghsign": "^1.2.2",
1415
"hyperlog": "^3.3.1",
@@ -18,6 +19,7 @@
1819
"node-gyp": "^1.0.3",
1920
"protocol-buffers": "^3.0.0",
2021
"request": "^2.55.0",
22+
"shelljs": "^0.4.0",
2123
"signalhub": "^3.3.0",
2224
"silence-chromium": "^1.1.0",
2325
"single-line-log": "^0.4.1",
@@ -28,7 +30,7 @@
2830
"devDependencies": {
2931
"standard": "^3.2.1"
3032
},
31-
"homepage": "https://github.com/ngoldman/peerbot",
33+
"homepage": "https://github.com/moose-team/peerbot",
3234
"keywords": [
3335
"bot",
3436
"chat",
@@ -49,11 +51,12 @@
4951
"main": "index.js",
5052
"repository": {
5153
"type": "git",
52-
"url": "https://github.com/ngoldman/peerbot.git"
54+
"url": "https://github.com/moose-team/peerbot.git"
5355
},
5456
"scripts": {
55-
"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",
56-
"start": "electron-spawn . --channel=friends",
57+
"postinstall": "npm run rebuild-leveldb",
58+
"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",
59+
"start": "electron-spawn .",
5760
"test": "standard"
5861
}
5962
}

0 commit comments

Comments
 (0)