This is a simple toy example that accesses both mongo and postgres through a Goliath async webserver.
Much of the code was lifted and rearranged from these demos:
This version uses:
- https://github.com/mperham/em_postgresql
- postgres-pr
- activerecord 2.3.5
I have a version of this example running with activerecord-3 and pg here:
This sets up gmp_development with a simple 'partners' table, with a key of "a"
% cd bin
% bash setup_db.sh
% bundle install
% bundle exec ruby mongo_pg.rb -sv
% curl -v 'http://localhost:9000/horoscope?app=a'
% curl -v 'http://localhost:9000/horoscope?app=b'