Created
September 22, 2021 14:02
-
-
Save SidneyAllen/1bcfbc65a5d68c9c73f483454321bfd6 to your computer and use it in GitHub Desktop.
av-bulk-update-get-method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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