Skip to content

Installing for Development

Glen E. Ivey edited this page Aug 19, 2013 · 15 revisions

Installing

To install PairMatic 2 for development or to run a server from your local host:

# FIRST, if you haven't before install the big binary dependencies:
####  node.js
  cd $SOMEWHERE_TEMPORARY
  wget http://nodejs.org/dist/v0.10.13/node-v0.10.13.tar.gz
  tar -xzf node-v0.10.13.tar.gz
  cd node-v0.10.13
  ./configure
  make
  make install        # possibly with sudo prefix
  cd ..

####  MongoDB -- see http://www.mongodb.org/downloads
    # for a Mac OS X install:
  wget http://fastdl.mongodb.org/osx/mongodb-osx-x86_64-2.4.5.tgz
  tar -xzf mongodb-osx-x86_64-2.4.5.tgz
  sudo mv mongodb-osx-x86_64-2.4.5 /usr/local
  sudo ln -s /usr/local/mongodb-osx-x86_64-2.4.5 /usr/local/mongodb
  sudo mkdir -p /data/db
  sudo chown `id -u` /data/db

    # setup mongod to auto-start with your system if and as you want, otherwise:
  /usr/local/mongodb/bin/mongod

# SECOND, get the PairMatic 2 source
  cd $DIRECTORY_YOU_WANT_THE_REPOSITORY_UNDER
  git clone git://github.com/gleneivey/pairmatic2.git

# THIRD, install npm packages
  cd pairmatic2
  npm install
  npm install -g grunt-cli
  npm install -g node_modules/jasmine-node
  npm install -g universal-jst

# FOURTH, configure your PairMatic server
  cp config-example.js config.js
  ### edit config.js to make it match your local MongoDB setups: custom port assignments, password, etc.
  /usr/local/mongodb/bin/mongo localhost/pairmatic --eval 'db.configurations.insert({apiToken: "your Tracker token"})'

Running

Start the PairMatic 2 server by going to the directory where you installed it and executing:

### with mongod already running, setup matching your config.js
cd $DIRECTORY_YOU_WANT_THE_REPOSITORY_UNDER/pairmatic2
jst --template handlebars client/js/templates/ client/js/templates.js
npm start           # possibly with sudo prefix

Clone this wiki locally