Skip to content

Instantly share code, notes, and snippets.

@nairihar
Created September 26, 2022 17:44
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 nairihar/a8a28fd581b1a57352a2afe88d6d213b to your computer and use it in GitHub Desktop.
Save nairihar/a8a28fd581b1a57352a2afe88d6d213b to your computer and use it in GitHub Desktop.
Three ways to work with File System in Node.js | Callbacks
const fs = require('fs');
fs.readFile('LICENSE.md', (err, data) => {
// ...
});
fs.writeFile('README.md', 'This is awesome!' (err) => {
// ...
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment