function slugify(str) {
  return str.replace(/[\/:]/g, '_');
}
Discovers all the pages in site or single page app (SPA) and creates
a tree of the result in ./output/<site slug/crawl.json. Optionally
takes screenshots of each page as it is visited.

Usage:
  node crawlsite.js
  URL=https://yourspa.com node crawlsite.js
  URL=https://yourspa.com node crawlsite.js --screenshots

Then open the visualizer in a browser:
  http://localhost:8080/html/d3tree.html
  http://localhost:8080/html/d3tree.html?url=../output/https___yourspa.com/crawl.json

Start Server:
  node server.js