Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Navjot Dhanawat navjotdhanawat

🎯
Focusing
View GitHub Profile
@navjotdhanawat
navjotdhanawat / mongo.js
Created Feb 3, 2019
Mongodb javascript to insert many document
View mongo.js
var user = [{
username : "navjot",
firstname : "Navjot",
lastname : "Dhanawat"
},{
username : "vitthal",
firstname : "Vitthal",
lastname : "Hajare"
},{
username : "shiva",
@navjotdhanawat
navjotdhanawat / json-to-s3.js
Created Jul 3, 2018
Create json and upload to s3 bucket using nodejs.
View json-to-s3.js
var AWS = require('aws-sdk');
AWS.config.update({ region: 'us-east-1' });
var s3 = new AWS.S3();
var obj = {
firstname: "Navjot",
lastname: "Dhanawat"
};
var buf = Buffer.from(JSON.stringify(obj));