Skip to content

Instantly share code, notes, and snippets.

@jscalderon65
Created April 8, 2022 18:27
Show Gist options
  • Save jscalderon65/79de94384b6b7e83bb29fc7289bb3b46 to your computer and use it in GitHub Desktop.
Save jscalderon65/79de94384b6b7e83bb29fc7289bb3b46 to your computer and use it in GitHub Desktop.
FsAsyncWay
const fs = require('fs').promises
const writeFile = async()=>{
await fs.writeFile('filename.txt', 'test');
}
const readFile = async()=>{
const file = await fs.readFile('filename.txt', 'utf8');
return file
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment