Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
read file
var fs = require('fs');
var path = require('path');
var filePath = path.join(__dirname, '/g.txt');
fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data) {
if (err) throw err;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.