Skip to content

AriT93/phone_app

Repository files navigation

phone_app

sinatra + node.js + mongodb  concept app for HackDay 2011

getting started

1. install the dependencies

$ sudo bash -c "echo deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen >> /etc/apt/sources.list"
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
$ sudo apt-add-repository ppa:chris-lea/node.js
$ sudo apt-get update
$ sudo apt-get install ruby rubygems mongodb-10gen nodejs
$ sudo gem install sinatra bson_ext mongo thin SystemTimer haml rack

2. install npm from npmjs.org
$ curl http://npmjs.org/install.sh | sh
$ npm install mongodb socket.io@0.6 mongoose

***** NOTICE *****
make sure to install socket.io v 0.6   there have been changes in v0.7 that
break app.  The new features do look pretty cool and all.  I just dont' know if
it's worth it right now to spend the time to figure out the new changes.

3. start the servers

$ node app.js

in a second shell

$ rackup
app will be running on localhost:9292
NOTE: if this doesn't work you may need to add the following to ~/.bashrc
export PATH=$PATH:/var/lib/gems/1.8/bin

for the mac users

install POW from 37 signals http://pow.cx

$ln -s ~/.pow/phone_app   /path/to/phone_app

http://phone_app.dev

to restart the ruby app

$ touch ~/.pow/phone_app/tmp/restart.txt