Skip to content

Instantly share code, notes, and snippets.

@Akifcan
Created March 23, 2021 00:03
Show Gist options
  • Save Akifcan/8d0141c1559d32ebdb071a39cfaec27c to your computer and use it in GitHub Desktop.
Save Akifcan/8d0141c1559d32ebdb071a39cfaec27c to your computer and use it in GitHub Desktop.
real function
exports = function(){
return context.http.get({ url: "http://gd.geobytes.com/GetCityDetails" })
.then(userInfo => {
const { geobytescountry, geobytesipaddress, geobytesfqcn } = EJSON.parse(userInfo.body.text())
const result = context.services.get("mongodb-atlas").db("cuties").collection("logs").insertOne({ geobytescountry, geobytesipaddress, geobytesfqcn });
return result
})
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment