53
rated 0 times
[
54]
[
1]
/ answers: 1 / hits: 106171
/ 12 Years ago, tue, march 27, 2012, 12:00:00
I want to load test.txt with nodejs.
var fs = require('fs');
fs.readFile('./test.txt', function (err, data) {
if (err) {
throw err;
}
console.log(data);
});
The path of the server is C:servertestserver.js
. The test.txt is located in the same directory, but I get this error: Error: ENOENT, no such file or directory 'C:UsersUsertest.txt'
More From » node.js