Crawling a Webpage using Node.js
Using the Node Package Manager, we will create our package.json file to manage our dependencies.
$ npm init
You can complete the npm init questions as you see fit. Here is my initial package.json file.
Now we can bring in our dependencies.
$ npm install broken-link-checker --save
Here is my updated package.json file.
Now that the setup is complete, we can start writing the crawler.
Running the Crawler
We can update the package.json file with the script to run the crawler.
Now we run it through NPM.
$ npm start