Skip to content

Instantly share code, notes, and snippets.

@ajduke
Last active January 24, 2016 06:09
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 ajduke/ab68ea174e97df009844 to your computer and use it in GitHub Desktop.
Save ajduke/ab68ea174e97df009844 to your computer and use it in GitHub Desktop.
fs= require(‘fs’)
//read it asynchronously
fs.readFile('package.json', function(err, res){
if(err){
console.log('Error while reading the file content ');
}
console.log('file contents- ' + res)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment