code: function isVulnerable (body) {
  	// Reject invalid queries
  	if (!body) {
  		return Promise.resolve(PATTERN_INVALID);
  	}
  	let isInvalid = false;
  	['pattern', 'language'].forEach((f) => {
  		if (!body.hasOwnProperty(f) || body[f] === null) {
  			isInvalid = true;
  		}
  	});
  	if (isInvalid) {
  		return Promise.resolve(PATTERN_INVALID);
  	}
  
  	log(`isVulnerable: Connecting to ${dbUrl}`);
  	return MongoClient.connect(dbUrl)
  		.then((client) => {
  			log(`isVulnerable: Connected`);
  
  			const db = client.db(dbName);
  			log(`isVulnerable: Got db ${dbName}`);
  
  			return collectionLookup(db.collection(dbLookupCollectionName), {pattern: body.pattern, language: body.language})
  				.then((result) => {
  					client.close();
  					return result;
  				})
  				.catch((e) => {
  					log(`isVulnerable: db error: ${e}`);
  					client.close();
  					return Promise.resolve(PATTERN_UNKNOWN);
  				});
  		})
  		.catch((e) => {
  			log(`isVulnerable: db error: ${e}`);
  			return Promise.resolve(PATTERN_UNKNOWN);
  		});
  }
docs: Returns a Promise that resolves to: PATTERN_INVALID: invalid query PATTERN_UNKNOWN: unknown pattern/language combination doc: found it, returns the doc from the DB