Skip to content

Instantly share code, notes, and snippets.

@sergiodxa
Created May 26, 2015 23:01
Show Gist options
  • Save sergiodxa/079fde628f8e9851e2df to your computer and use it in GitHub Desktop.
Save sergiodxa/079fde628f8e9851e2df to your computer and use it in GitHub Desktop.
Callbacks en Node.js
import fs from 'fs';
fs.readFile('archivo.txt', (error, data) => {
if (error) throw error;
console.log(data.toString());
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment