Rewrite of adheScan with JS / node JS / mongodb