The solution for exercise 21.1, suggesting using writeFile in the update function, gives me an alert with "Error: Internal Server Error", and the JSON is not written to the file.
Not sure if I'm doing something wrong with writeFile, but I managed to solve the problem by using the synchronous writeFileSync instead.
The solution for exercise 21.1, suggesting using
writeFile
in the update function, gives me an alert with "Error: Internal Server Error", and the JSON is not written to the file.Not sure if I'm doing something wrong with
writeFile
, but I managed to solve the problem by using the synchronouswriteFileSync
instead.