This repository has been archived by the owner on Jul 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
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 #3 from moose-team/cli
experimental release
- Loading branch information
Showing
4 changed files
with
58 additions
and
17 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,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 | ||
|
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env node | ||
|
||
process.chdir(__dirname + '/../') | ||
|
||
var exec = require('shelljs').exec | ||
|
||
exec('electron-spawn . $@') |
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