I am writing a login system in Node.js. I am generating password automatically
app.post("/new/user", (req, res,)=>
{
var passwd = generateRandomPasswd();
fs.writeFileSync("credentials.txt", "Username : "+req.body.userName+"\nPassword : "+passwd);
})
How can I send this credential file to the client machine??