How do I access the function 'fs.readFile' from within node within repl.it?
import fs from 'fs'; let ourStuff = fs.readFile('G:\DATA\git\ipromise\ipromise.txt','utf8', callback); console.log(ourStuff);
@ajayprashar Hmm. I would not. Oversimplifying, repl.it runs their Node processes on Linux. And Linux uses forward slashes. I would consider using
path.join() to ensure that it works both on your Windows machine and on replit. Something kind of like
path.join(__dirname, 'ipromise.txt') instead of
To do this you need to import the path module
let path = require('path');