Created
April 8, 2022 18:27
-
-
Save jscalderon65/79de94384b6b7e83bb29fc7289bb3b46 to your computer and use it in GitHub Desktop.
FsAsyncWay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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