Skip to content

Commit 5d48251

Browse files
authored
Update demo.js
1 parent 665b20b commit 5d48251

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

api/demo.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ const fs = require('fs')
55

66
module.exports = (req, res) => {
77

8-
fs.writeFileSync('./hello.txt', 'hello world', err => {
9-
if (err) {
10-
console.error(err)
11-
return
12-
}
13-
//文件写入成功。
14-
})
8+
// fs.writeFileSync('./hello.txt', 'hello world', err => {
9+
// if (err) {
10+
// console.error(err)
11+
// return
12+
// }
13+
// //文件写入成功。
14+
// })
1515

1616
const data = fs.readFileSync('./hello.txt', 'utf8')
1717

1818
res.json({
1919
data
2020
})
21-
}
21+
}

0 commit comments

Comments
 (0)