- To work with this application you need to have nodeJS installed.
- Run
npm installto install the dependencies
- Create the messages table
CREATE TABLE messages(text TEXT);
INSERT INTO messages(text) VALUES('hello simplon');
INSERT INTO messages(text) VALUES('hello world’);
- Run the app (see the node-postgres doc for more details on environment variables)
PGDATABASE=? PGPASSWORD=? PGUSER=? node app.js