Closed ErickRenteria closed 3 years ago
Environment:
I'm not able to scan my localhost. Every time I run a scan it completes right away. If I point to a different site the scan runs but not local. Here is my code. Am I missing something here?
var { SiteChecker } = require("broken-link-checker"); var logCount = 0 const siteChecker = new SiteChecker( { excludeInternalLinks: false, excludeExternalLinks: false, filterLevel: 0, acceptedSchemes: ["http", "https"], excludedKeywords: ["other" ], }, { "error": (error) => { console.error(error); }, "link": (result, customData) => { if(result.broken) { if(result.http.response && ![undefined, 200].includes(result.http.response.statusCode)) { console.log(`${result.http.response.statusCode} => ${result.url.original}`); } } console.log("Scanning link:" + logCount); logCount++; }, "end": () => { console.log("COMPLETED!"); } } ); siteChecker.enqueue("http://localhost:8000/");
worked fine for me using node v12.18.4 in docker
Same problem here - duplicate of https://github.com/stevenvachon/broken-link-checker/issues/181
Environment:
I'm not able to scan my localhost. Every time I run a scan it completes right away. If I point to a different site the scan runs but not local. Here is my code. Am I missing something here?