I am writing an express web application
I need to write the body of post request into disk, but the returned promise would have no use for me.
Is it necessary to await or attach then function to the returned promise?
import { promises as fs } from 'fs';
import express from 'express';
const app = express();
app.post('/', (req, res) => {
fs.writeFile(`record/${req.body.name}.json`, JSON.stringify(req.body));
res.send(`Hello World`);
});
app.listen(8080);