Description
Intriguing project! Unfortunately, I can't seem to get the current code base to do...anything for sure.
I'm running the latest Turnkey Linux stable in VirtualBox on a win32 platform. I successfully built node.js, and can run the basic example from nodejs.org and get it to serve a page to a client browser on win32.
But when I replace that with the example in the node-postgres readme, which I modified only to match my system's connection parameters, it runs, but nothing happens--no console output aside from the initial newline. Hitting it from a web browser says it can't connect (which makes sense, since it's not running a server.) If I add "console.log('start')" as the first line and similarly for the last line, both get logged one after another immediately when I run it, but still, no apparent database action.
So I tried the example app at https://github.com/brianc/node-postgres/wiki/Example . First of all, I had to change all the places where it said ?() to say function(), because I was getting syntax errors (were they supposed to be "?"? If so, is there some other missing dependency or setup step?) After that, it ran, but same thing again just sitting there after a newline, except that hitting it from a web browser results in a timeout (even if I change the port to 80 in the example code, or do :3000 in the url.) If I do the start/end console log statements, they too come out immediately one after another upon startup.
If I change the connection code to the wrong host, I get the appropriate error. If I instead change to the wrong port, user, password, or database, and I get no error but still no results. Lastly, I can connect to my postgres database using psql from the same Linux command-line I'm running node.js from.
Not sure what else to try...any hints?