Skip to content

Instantly share code, notes, and snippets.

@aug2uag
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aug2uag/8a36bcf9311dcf98ea67 to your computer and use it in GitHub Desktop.
Save aug2uag/8a36bcf9311dcf98ea67 to your computer and use it in GitHub Desktop.
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;
console.log(data);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment