Bam currently depends on Dnsmasq.
Installing and configuring it is simple:
$ brew install dnsmasq $ echo "listen-address=127.0.0.1" >> /usr/local/etc/dnsmasq.conf $ echo "address=/bam/127.0.0.1" >> /usr/local/etc/dnsmasq.conf $ sudo cp /usr/local/Cellar/dnsmasq/2.61/homebrew.mxcl.dnsmasq.plist /Library/LaunchDaemons $ sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
Forward port 80 to Bam:
$ ipfw add fwd 127.0.0.1,30559 tcp from any to me dst-port 80 in $ sysctl -w net.inet.ip.forwarding=1
Clone Bam via GitHub for now. It's not on PyPi yet.
You'll probably want to create a virtualenv first.
$ git clone git://github.com/adammck/bam.git $ cd bam $ ./bam.py
That's it. There's no fancy launch script yet. I know, I know.
Once you're up and running, adding an app is easy.
Symlink it into
~/.bam, and Bam takes care of the rest:
$ cd ~/.bam $ ln -s /path/to/myapp
Your app is now available at
To launch an app in a virtualenv, create a file named
.venv containing the
path to the virtualenv in the project root. For example:
To configure the environment in which an app is launched, create a file named
.bam-vars containing one variable per line in the
NAME=VALUE format in the
project root. For example:
SECRET_KEY=aaaaaa TWITTER_CONSUMER_KEY=bbbbbb TWITTER_CONSUMER_SECRET=cccccc