Friday, May 27, 2011

How-To: Install the Locker Project

The Locker Project collects your personal data into a single platform. You can read more about its core values and goals at the Locker Project blog.


This how-to covers installing on OSX. It assumes you have gcc, git, python, and setuptools

1. Install node.js
$ git clone --depth 1 https://github.com/joyent/node.git
$ cd node/
$ export JOBS=2
$ mkdir ~/local
$ ./configure --prefix=$HOME/local/node
$ make
$ make install
$ export PATH=$HOME/local/node/bin:$PATH
2. Install npm
$ curl http://npmjs.org/install.sh | sh
3. Install the locker
$ git clone https://github.com/quartzjer/Locker.git
$ cd Locker
$ npm install
$ python setupEnv.py
4. Start the locker and go to http://localhost:8042 in your browser
$ node lockerd.js
If you see "TypeError: Invalid argument to getAgent" you will need to change the following in node-http-proxy.js 
$ cd ./Locker/node-modules/http-proxy/lib

# using your favorite editor, change node-http-proxy.js to look like this:

function _getAgent (host, port, secure) {
//var agent = !secure ? http.getAgent(host, port) : https.getAgent({
// host: host,
// port: port
//});
var opts = {
host: host,
port: port
};
var agent = !secure ? http.getAgent(opts) : https.getAgent(opts);

agent.maxSockets = maxSockets;
return agent;
}