[tor-commits] [flashproxy/master] nodejs proxy: restructure install docs and mention a pure-apt install
infinity0 at torproject.org
infinity0 at torproject.org
Wed Nov 20 15:55:41 UTC 2013
commit 44aa48cf7416ef94752276a753049919f94cc8a7
Author: Ximin Luo <infinity0 at gmx.com>
Date: Wed Nov 20 13:59:39 2013 +0000
nodejs proxy: restructure install docs and mention a pure-apt install
---
.gitignore | 4 ----
proxy/modules/nodejs/.gitignore | 3 +++
proxy/modules/nodejs/INSTALL | 35 +++++++++++++++++++++++++++++++++++
proxy/modules/nodejs/Makefile | 7 +------
proxy/modules/nodejs/README | 23 -----------------------
5 files changed, 39 insertions(+), 33 deletions(-)
diff --git a/.gitignore b/.gitignore
index 439f73d..5672537 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,7 +5,3 @@
/dist
/*.egg-info
/py2exe-tmp
-
-/proxy/modules/nodejs/node_modules
-/proxy/modules/nodejs/flashproxy.js
-
diff --git a/proxy/modules/nodejs/.gitignore b/proxy/modules/nodejs/.gitignore
new file mode 100644
index 0000000..72f73ff
--- /dev/null
+++ b/proxy/modules/nodejs/.gitignore
@@ -0,0 +1,3 @@
+/flashproxy.js
+/node_modules
+/npm-debug.log
diff --git a/proxy/modules/nodejs/INSTALL b/proxy/modules/nodejs/INSTALL
new file mode 100644
index 0000000..9f6f677
--- /dev/null
+++ b/proxy/modules/nodejs/INSTALL
@@ -0,0 +1,35 @@
+First, install nodejs:
+
+ # apt-get install nodejs
+
+Make sure flashproxy.js exists in the current directory, either a symlink or
+a plain copy.
+
+== Install from source
+
+If your distribution contains both the following packages (newer suites of
+Debian and Ubuntu), you can run main.js directly:
+
+ # apt-get install node-xmlhttprequest node-ws
+ $ nodejs main.js
+
+Otherwise, you can use npm to install it as a package, along with all its
+dependencies:
+
+ # apt-get install npm
+ # npm install -g
+ $ flashproxy
+
+== Install from npm registry
+
+This package is also being published on the npm registry. To install from there
+rather than your local copy, run:
+
+ # npm install -g flashproxy
+ $ flashproxy
+
+Rather than install globally, you can also,
+
+ $ cd ~/ # or, to the dir of your choice
+ $ npm install flashproxy
+ $ npm start flashproxy # or, node node_modules/flashproxy
diff --git a/proxy/modules/nodejs/Makefile b/proxy/modules/nodejs/Makefile
index 8809eb0..9b1f8ce 100644
--- a/proxy/modules/nodejs/Makefile
+++ b/proxy/modules/nodejs/Makefile
@@ -1,9 +1,4 @@
-.PHONY: prepublish apt-get-build-dep
-
-apt-get-build-dep:
- apt-get install nodejs node-xmlhttprequest
- apt-get install npm && npm install ws
- @echo "warning: Debian has node.js as /usr/bin/nodejs; install nodejs-legacy if you need it in /usr/bin/node"
+.PHONY: prepublish
prepublish: flashproxy.js
flashproxy.js: ../../flashproxy.js
diff --git a/proxy/modules/nodejs/README b/proxy/modules/nodejs/README
index 57d0ddf..2f14bcd 100644
--- a/proxy/modules/nodejs/README
+++ b/proxy/modules/nodejs/README
@@ -3,26 +3,3 @@
Traditionally, flash proxies have run in the browser. However, it may be
desirable to run them as background daemons. This directory contains a main.js
file which wraps the regular flashproxy.js and runs headlessly from node.js.
-
-To install the requirements (in Ubuntu universe),
-
- > apt-get install git nodejs npm
-
-Then, if you've checked out the flashproxy source from git,
-
- > git clone https://git.torproject.org/flashproxy.git
- > cd flashproxy/modules/nodejs
- > npm install
- > npm start # or, node main.js
-
-This package is also being published on the npm registry. To add a `flashproxy`
-bin to your path without checking out from git, at any time run,
-
- > npm install -g flashproxy
- > flashproxy
-
-Rather than install globally, you can also,
-
- > cd ~/ # or, to the dir of your choice
- > npm install flashproxy
- > npm start flashproxy # or, node node_modules/flashproxy
More information about the tor-commits
mailing list