hackday project
CoffeeScript JavaScript CSS HTML Shell Ruby Batchfile
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
coffee_src
doc
public
tmp
views
#app.js#
.gitignore
.rvmrc
Procfile
README
app.coffee
app.js
app.save
config.ru
models.js
package-lock.json
package.json
phone_app.rb
tasks.org

README

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