Broken App or Node Express

Description

Projects & Exercises The assessment has three parts:In the first part, you’ll answer a series of conceptual questions in a Markdown fileIn the second part, you’ll write a script in JavaScript to run from the command lineIn the third part, you’ll fix a broken Express application Part 1: Conceptual
Answer the questions inside the conceptual.md file.
Part 2: Async and Scripting Practice
Write a Command-Line Script
Write a script, urls.js, that does the following:

Don't use plagiarized sources. Get Your Custom Assignment on
Broken App or Node Express
From as Little as $13/Page

It is called on the command line like node urls.js FILENAME, and it reads the contents of FILENAME(each line of that file will be a URL).
For each URL, it will get that page (a GET request to the URL) and save the HTML in a new file.
For each URL, the output filename should be the hostname of the URL. For example, for the input URL *http://yahoo.com/blah/blah*, your script should write the contents to a plain text file called yahoo.com

Handle Errors

If you cannot read the original file (FILENAME), immediately end your script with an error printed to the console.
If you cannot download a particular URL or cannot write to a particular output file, print an error to the console saying so, but continue on with the rest of the script.

Examples
We provide a file, urls.txt, which contains:urls.txt

Invoking the script should look something like this:$node urls.js urls.txt
Couldn’t downloadhttp://foozlemcblargh.com
Wrote to rithmschool.com
Wrote to nodejs.org
Wrote to postgresql.com

$ls
nodejs.org
postgresql.com
rithmschool.com

$cat nodejs.org

Bonus!
A straightforward implementation of that would download the URLs one-by-one.This works, but it would be faster to do all of the downloading at once.As a bonus, see if you can find a nice way to start all of the downloading at once.
Part 3: Broken App!
Yay! You got a job as an Express developer!Boo! The last developer left in a hurry, and left a mess.You’ve been given a non-working small app, broken-app. It should have one route:**POST /**Given a list of GitHub users names, this should return information about those developers.
Should get JSON body like {developers: [username, …]}
Should return [ {name, bio}, … ]For example, if we POST:{ “developers”: [“joelburton”, “elie”] }

to /, it should return:[
{
“bio”: “Open source developer. Former dev at Apple…”,
“name”: “Joel Burton”
},
{
“bio”: “Co-founder + Lead Instructor @rithmschool “,
“name”: “Elie Schoppik”
}
]

The order of the output array does not matter.
Fix It!
Most of the script is written and working. There’s a least one bug in it, though, so it doesn’t work now.Find and fix any bugs!

Refactor It!
In addition, the code is terrible. Use some of the common best practices you’ve learned for Express apps, and make this better. Feel free to change variable names, add comments, write helper functions/middleware, etc.
Document Issues!
Lastly, you want to get credit with your boss for all the hard work you put in fixing this code.In the starter code, document bad things into the issues.md file.