more experiments with connected back end structure
This commit is contained in:
@@ -5,6 +5,7 @@ const pool = new Pool({ connectionString: process.env.CONNECTION });
|
||||
|
||||
module.exports = {
|
||||
// text = SQL query; params = array of values to inject
|
||||
pool,
|
||||
connect: async () => await pool.connect().then(console.log("Connection successful.")),
|
||||
query: (text, params) => pool.query(text, params),
|
||||
end: async () => await pool.end()
|
||||
|
||||
Reference in New Issue
Block a user