- Fork this repo so you can push your changes when you finish
- Make sure you have installed node
v7.8.0
- Perform a
npm i
in the project folder. - Code
Edit callback.js
:
- Refactor the solution using named functions. We'll need at least an
uploadFile
function for the following exercises.
- Copy the contents of
callbacks.js
intopromises.js
- Change the
uploadFile
function 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.js
intoasync.js
- Refactor all the functions you can to the new
async / await
syntax and make sure the tests are passing. - Try to figure out how to run the uploads in a serialized way instead of parallelized.