flesh out js, and start to integrate postgres db
update config files to use postgres, and to separate logic into multiple files