Dead simple command line monitoring and debugging tool, based on Puppeteer.
Specify an array of urls to scrape and naos will evaluate them through Puppeteer, returning you a status code and any browser console warnings or errors it finds.
Puppeteer is awesome and allows you to build very advanced integration test suites, however sometimes you
don't need or don't have time to write anything more advanced than making sure your routes return a 200
and
the console doesn't throw any errors. This can be very useful as a quick and basic regression checking tool.
npm install -g naos
First create a config.json file like so:
{
"protocol": "https",
"host": "www.nytimes.com",
"port": 443,
"paths": [
"/",
"/section/world/"
]
}
And begin scraping:
naos --config ./config.json
With JSON output instead:
naos --config ./config.json --format json