You have a server which stores a directory structure. The task is to replicate the structure on the client.
- Clone the project
git clone https://github.com/pixyj/mb-async-live-review-3 async_live_review
- cd to the
async_live_review
directory
cd async_live_review
- Install dependencies
npm install
- Start the server
node server.js
- Fetch the root directory by making a fetch request to the
/
url. - Identify the directories in the root directory and fetch all the files belonging to each directory.
- Once all the files are fetched, print all the items that are files.
- node-fetch - https://www.npmjs.com/package/node-fetch