Skip to content

Instantly share code, notes, and snippets.

@SidneyAllen
Created September 22, 2021 14:02
Show Gist options
  • Save SidneyAllen/1bcfbc65a5d68c9c73f483454321bfd6 to your computer and use it in GitHub Desktop.
Save SidneyAllen/1bcfbc65a5d68c9c73f483454321bfd6 to your computer and use it in GitHub Desktop.
av-bulk-update-get-method
// Query the addresses table and render the results in the HTML file
app.get('/', (request, response) => {
pool.query('SELECT * FROM addresses ORDER BY id ASC', (error, results) => {
if (error) {
throw error
}
response.render(path.join(__dirname, '/public', 'main.html'), {addresses: results.rows});
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment