Answer the question
In order to leave comments, you need to log in
What is the best way to read data from a file: fileRead or require?
There is a JSON file that acts as a mini database for storing data from a small site.
What is the best way to read data from there?
Now everything works just
Do I need to include fs.readFile (or async)? What's the difference anyway? const data = require('./data.json')
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question