works without config.js, and improved docs

This commit is contained in:
Manuel Araoz 2014-06-02 12:55:32 -03:00
parent 40f8db0e91
commit 50dbb5b277
3 changed files with 56 additions and 20 deletions

View File

@ -1,9 +1,8 @@
[![Build Status](https://secure.travis-ci.org/bitpay/copay.png)](http://travis-ci.org/bitpay/copay) [![Build Status](https://secure.travis-ci.org/bitpay/copay.png)](http://travis-ci.org/bitpay/copay)
Copay # Copay
=====
Installation: ## Installation:
``` ```
git clone https://github.com/bitpay/copay.git git clone https://github.com/bitpay/copay.git
@ -31,6 +30,8 @@ node app.js
Then visit localhost:3000 in your browser. Then visit localhost:3000 in your browser.
## Running copay
To run on a different port: To run on a different port:
``` ```
PORT=3001 node app.js PORT=3001 node app.js
@ -45,14 +46,22 @@ PORT=3004 node app.js
PORT=3005 node app.js PORT=3005 node app.js
``` ```
To open n different instances just run: To open n different instances more easily, just run:
``` ```
node launch.js n n=5
node launch.js $n &
``` ```
## Configuration
Default configuration can be found in the config.template.js file.
If you want to configure Copay differently, you can copy that file
to config.js and change the values.
About Copay See config.template.js for more info on configuration options.
===========
# About Copay
General General
------- -------

View File

@ -1,26 +1,44 @@
'use strict'; 'use strict';
var defaultConfig = { var defaultConfig = {
// livenet or testnet
networkName: 'testnet', networkName: 'testnet',
// wallet limits
limits: {
totalCopayers: 12,
mPlusN: 100
},
// network layer (PeerJS) config
network: { network: {
// key: 'lwjd5qra8257b9', //Copay API key for public PeerJS server // Use this to run your own local PeerJS server
// This is for running local peerJs with params: ./peerjs -p 10009 -k 'sdfjhwefh' // with params: ./peerjs -p 10009 -k '6d6d751ea61e26f2'
//key: 'sdfjhwefh', /*
//host: 'localhost', key: '6d6d751ea61e26f2',
//port: 10009, host: 'localhost',
//path: '/', port: 10009,
// path: '/',
key: 'satoshirocks', // api key for the peerjs server */
host: '162.242.219.26', // peerjs server
// Use this to connect to bitpay's PeerJS server
key: 'satoshirocks',
host: '162.242.219.26',
port: 80, port: 80,
path: '/', path: '/',
// other PeerJS config
maxPeers: 15, maxPeers: 15,
debug: 3, debug: 3,
// Network encryption config
sjclParams: { sjclParams: {
salt: 'mjuBtGybi/4=', // choose your own salt (base64) salt: 'mjuBtGybi/4=', // choose your own salt (base64)
iter: 1000, iter: 1000,
mode: 'ccm', mode: 'ccm',
ts: parseInt(64), ts: parseInt(64),
}, },
// PeerJS internal config object
config: { config: {
'iceServers': [ 'iceServers': [
// Pass in STUN and TURN servers for maximum network compatibility // Pass in STUN and TURN servers for maximum network compatibility
@ -78,28 +96,35 @@ var defaultConfig = {
] ]
} }
}, },
limits: {
totalCopayers: 12, // wallet default config
mPlusN: 100
},
wallet: { wallet: {
requiredCopayers: 2, requiredCopayers: 2,
totalCopayers: 3, totalCopayers: 3,
spendUnconfirmed: 1, spendUnconfirmed: 1,
verbose: 1, verbose: 1,
}, },
// blockchain service API config
blockchain: { blockchain: {
host: 'test.insight.is', host: 'test.insight.is',
port: 3001 port: 3001
}, },
// socket service API config
socket: { socket: {
host: 'test.insight.is', host: 'test.insight.is',
port: 3001 port: 3001
}, },
// local encryption/security config
passphrase: { passphrase: {
iterations: 100, iterations: 100,
storageSalt: 'mjuBtGybi/4=', storageSalt: 'mjuBtGybi/4=',
}, },
// theme list
themes: ['default'], themes: ['default'],
verbose: 1, verbose: 1,
}; };

View File

@ -725,6 +725,8 @@ on supported browsers please check <a href="http://www.webrtc.org/">http://www.w
<p class="text-center"><a href="#/">go back...</a></p> <p class="text-center"><a href="#/">go back...</a></p>
</script> </script>
<script src="config.template.js"></script>
<script src="config.js"></script> <script src="config.js"></script>
<script src="lib/angular/angular.min.js"></script> <script src="lib/angular/angular.min.js"></script>