From ae29fcf6c7081b749863bd9f60b49bb97345ed94 Mon Sep 17 00:00:00 2001 From: Ben Chan Date: Fri, 10 Apr 2015 09:50:32 -0700 Subject: [PATCH] update docs, get environment from shell Summary: update docs on starting bitgoexpress get bitgo environment from shell variable BITGO_ENV put an example browser.html to show how to include sdk into browser side app Reviewers: ryan Reviewed By: ryan Subscribers: ben Differential Revision: https://phabricator.bitgo.com/D886 --- README.md | 2 +- browser.html | 8 ++++++++ src/bitgo.js | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 browser.html diff --git a/README.md b/README.md index 6463a01c77..a66e4bcddf 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Suitable for developers working in a language without an official BitGo SDK. BitGo Express runs as a service in your own datacenter, and handles the client-side operations involving your own keys, such as partially signing transactions before submitting to BitGo. This ensures your keys never leave your network, and are not seen by BitGo. BitGo Express can also proxy the standard BitGo REST APIs, providing a unified interface to BitGo through a single REST API. -`bin/bitgo-express` +`bin/bitgo-express [-h] [-v] [-p PORT] [-b BIND] [-e ENV] [-d] [-k KEYPATH] [-c CRTPATH]` # Compile diff --git a/browser.html b/browser.html new file mode 100644 index 0000000000..717331c5c7 --- /dev/null +++ b/browser.html @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/bitgo.js b/src/bitgo.js index d8da4b1b8e..22a868adf1 100644 --- a/src/bitgo.js +++ b/src/bitgo.js @@ -114,7 +114,7 @@ var BitGo = function(params) { throw new Error('invalid environment'); } } else { - params.env = 'test'; + params.env = process.env.BITGO_ENV || 'test'; } this.env = params.env;