- You can connect to your Postgres database using the
pg
module - You need to know the name of the database (see
config
in server/routes/books.js) - Use
pool.connect(...)
to connect to the database - Use
client.query(...)
to query the database with SQL - When creating queries with client-submitted data, always use the prepared statement pattern (see router.post in server/routes/books.js)
theherms / upsilon-node-pg Goto Github PK
View Code? Open in Web Editor NEWThis project forked from primeacademy/upsilon-node-pg
Examples of executing SQL queries through Node.