Posts by Norton Glitz • 53 points
2 posts
-
2
votes1
answer90
viewsQ: How to delete all FK records by deleting their "owner" with Sequelize?
I’m making a database and it has some properties and it has users. A user can have several properties, so in the properties table I inserted the column user_id, to reference the user. But when I…
-
2
votes1
answer213
viewsQ: Treating error in callback function
I’m trying to fix a mistake in the following code: const fs = require('fs') fs.readFile('dados/arqui2vo.json', (err, data) => { if (err) throw new Error(`Can't find the file`) When I run the…