- Fork this repo so you can push your changes when you finish
- Make sure you have installed node
v7.8.0 - Perform a
npm iin the project folder. - Code
Edit callback.js:
- Refactor the solution using named functions. We'll need at least an
uploadFilefunction for the following exercises.
- Copy the contents of
callbacks.jsintopromises.js - Change the
uploadFilefunction so it returns a Promise - We have installed
fs-promise, a library that wraps fs and make it work with promises. Refactor the upload of the file with a chained promise. - Change the way of waiting until all the files have been uploaded. Instead of a queue, we can now use
Promise.all.
- Copy the contents of
promises.jsintoasync.js - Refactor all the functions you can to the new
async / awaitsyntax and make sure the tests are passing. - Try to figure out how to run the uploads in a serialized way instead of parallelized.