Skip to content

Instantly share code, notes, and snippets.

View FaizUlHassan123's full-sized avatar

Faiz Ul Hassan FaizUlHassan123

  • SDSol Technologies
  • Lahore
  • 12:53 (UTC +05:00)
View GitHub Profile
@FaizUlHassan123
FaizUlHassan123 / index.js
Created August 14, 2021 13:08
mongodb - google cloud functions write example
const { MongoClient } = require("mongodb");
// // Replace the uri string with your MongoDB deployment's connection string.
const url = "monGoDb uri";
// //get all rows from collections
exports.helloWorld = (req, res) => {
MongoClient.connect(url, function(err, db) {
if (err) throw res.status(200).send(err);