diff --git a/.gitignore b/.gitignore index af45d2c34..cd2274086 100644 --- a/.gitignore +++ b/.gitignore @@ -40,4 +40,4 @@ lib/* !lib/socket.io.js js/copayBundle.js -js/config.js +config.js diff --git a/README.md b/README.md index d7b8db5cf..5b68e1dcd 100644 --- a/README.md +++ b/README.md @@ -1 +1,29 @@ Copay +===== + +Installation: + +Copy config.template.js to config.js and edit to suit your needs. (Defaults to +public PeerJS and Insight servers) + +Then execute these commands: +``` +npm install +bower install +grunt --target=dev shell +node app.js +``` + +To run on a different port: +``` +PORT=3001 node app.js +``` + +To open up five different instances to test 3-of-5 multisig with yourself, then run this in 5 different terminals: +``` +PORT=3001 node app.js +PORT=3002 node app.js +PORT=3003 node app.js +PORT=3004 node app.js +PORT=3005 node app.js +``` diff --git a/app.js b/app.js new file mode 100644 index 000000000..543f33e01 --- /dev/null +++ b/app.js @@ -0,0 +1,12 @@ +var express=require("express"); +var http=require("http"); + +var app=express(); + +var port = process.env.PORT || 3000; +app.set("port", port); +app.use(express.static(__dirname)); + +app.listen(port, function(){ + console.log("Listening at: http://localhost:" + port); +}); diff --git a/js/config.template.js b/config.template.js similarity index 78% rename from js/config.template.js rename to config.template.js index e49763637..eb8cdcbb8 100644 --- a/js/config.template.js +++ b/config.template.js @@ -3,12 +3,12 @@ var config = { networkName: 'testnet', network: { -// key: 'lwjd5qra8257b9', + key: 'lwjd5qra8257b9', //Copay API key for public PeerJS server // This is for running local peerJs with params: ./peerjs -p 10009 -k 'sdfjhwefh' - key: 'sdfjhwefh', - host: 'localhost', - port: 10009, - path: '/', + //key: 'sdfjhwefh', + //host: 'localhost', + //port: 10009, + //path: '/', maxPeers: 3, debug: 3, }, diff --git a/index.html b/index.html index b9f10e7ce..63039e996 100644 --- a/index.html +++ b/index.html @@ -392,6 +392,8 @@ missing
+ + @@ -406,7 +408,6 @@ missing - diff --git a/package.json b/package.json index 99b94e0ee..3e3eb6eb7 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ }, "homepage": "https://github.com/bitpay/copay", "devDependencies": { + "express": "4.0.0", "grunt-contrib-watch": "~0.5.3", "grunt-mocha-test": "~0.8.2", "grunt-shell": "~0.6.4",