LutherSrProject/TapVote — pull request #186 by etingel (2014-02-27 22:24:32+00:00)
Title: Initial session support

This pull request adds the basic framework for using sessions, laying the groundwork for #86.

To get it working, do the following:

(Steps created by following the steps here:
https://github.com/jebas/connect-pg )

sudo apt-get install pgtap
npm install
sudo -u postgres psql -d tapvote -f ./node_modules/connect-pg/lib/session_install.sql
sudo -u postgres psql -d tapvote
CREATE EXTENSION pgtap;
select correct_web();

To change nodepg's password:
alter user nodepg with password 'wearetapvote'

Recommend using environmental vars TAPVOTE_DATABASE_SESSION_USER and TAPVOTE_DATABASE_SESSION_PASSWORD to use the nodepg account, which has minimal permissions.