Sort the following steps in the correct order to read a file using fs and the Streams Promises API in Node.js.
Introduction to Streams module
Reading a file
Report a typo
Put the items in the correct order
Define the asynchronous
function main()Create a read stream with
fs.createReadStream('input.txt')Console log 'Pipeline succeeded.'
Catch any errors with
.catch(console.error)Create a write stream with
fs.createWriteStream('output.txt')Require the necessary modules
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.