Posts by northb9a • 11 points
3 posts
-
1
votes2
answers31
viewsA: Different results doing what I think is the same thing ( Mongoose js )
You are using 'await', that means your code will be executed asynchronously, that is, the rest of the code will be executed while waiting for the callback. When you use:…
-
0
votes1
answer30
viewsA: How to pass a JSON to the Express front end
To load the contents of the JSON file to the server synchronously: var fs = require('fs'); app.use(express.static('public')) app.use(express.json()); var jsonData =…
-
0
votes2
answers27
viewsA: SQL command works on SQL SHELL, but does not work on Node (pg) (probably something related to accentuation)
Replace the code snippet below: routes.get('/pessoas', async function(req, res) { const response = await pool.query("select * from pessoas where disciplina = 'Matemática'");…