SyntaxFix
Write A Post
Hire A Developer
Questions
If you are trying to send a json file you can use streams
var usersFilePath = path.join(__dirname, 'users.min.json'); apiRouter.get('/users', function(req, res){ var readable = fs.createReadStream(usersFilePath); readable.pipe(res); });