Node.js
  • Products
    • Node.js
      Pabbly Plus
      Pabbly Plus

      Pabbly Plus provides access to all Pabbly applications at a single price. You will have access to Pabbly Connect, Pabbly Subscription Billing, Pabbly Chatflow, Pabbly Email Marketing, Pabbly Form Builder and Pabbly Hook.

      Group 1
      Pabbly Connect

      Integrate different applications and start automating your work.

      PSB
      Pabbly Subscription Billing

      Start accepting one-time and recurring subscription payments.

      pch
      Pabbly Chatflow

      Automate WhatsApp conversations effortlessly.

      PEM
      Pabbly Email Marketing

      Send email newsletters to your subscribers and customers.

      PFB
      Pabbly Form Builder

      Create professional forms for your business with no code builder.

      ph
      Pabbly Hook

      Webhook event handling for scalable applications.

      PEV
      Pabbly Email Verification

      Verify your email list to remove invalid and bad emails.

      Sign Up Free

      No Credit Card Required.

  • Sign In
Menu
  • Products
    • Node.js
      Pabbly Plus
      Pabbly Plus

      Pabbly Plus provides access to all Pabbly applications at a single price. You will have access to Pabbly Connect, Pabbly Subscription Billing, Pabbly Chatflow, Pabbly Email Marketing, Pabbly Form Builder and Pabbly Hook.

      Group 1
      Pabbly Connect

      Integrate different applications and start automating your work.

      PSB
      Pabbly Subscription Billing

      Start accepting one-time and recurring subscription payments.

      pch
      Pabbly Chatflow

      Automate WhatsApp conversations effortlessly.

      PEM
      Pabbly Email Marketing

      Send email newsletters to your subscribers and customers.

      PFB
      Pabbly Form Builder

      Create professional forms for your business with no code builder.

      ph
      Pabbly Hook

      Webhook event handling for scalable applications.

      PEV
      Pabbly Email Verification

      Verify your email list to remove invalid and bad emails.

      Sign Up Free

      No Credit Card Required.

  • Sign In
Sign Up Free
Node.js
  • Products
    • Pabbly Plus
    • Pabbly Connect
    • Pabbly Subscription Billing
    • Pabbly Email Marketing
    • Pabbly Form Builder
    • Pabbly Hook
    • Pabbly Chatflow
    • Pabbly Email Verification
  • SignUp
  • SignIn
Menu
  • Products
    • Pabbly Plus
    • Pabbly Connect
    • Pabbly Subscription Billing
    • Pabbly Email Marketing
    • Pabbly Form Builder
    • Pabbly Hook
    • Pabbly Chatflow
    • Pabbly Email Verification
  • SignUp
  • SignIn
Loading...

Node.js Mongodb Create Collection

Last Updated on March 9, 2019
by Pabbly Team
Create COLLECTION in mongodb using node.js - If there is a database 'db2' in your mongodb and you want to create a collection 'students' inside this database; use the following code- //to import mongodb var MongoClient = require('mongodb').MongoClient; var url = "mongodb://localhost:27017/db2"; //make client connect MongoClient.connect(url, function (err, client) { var db = client.db('db2'); if (err) throw err; //students is a collection we want to create inside db2 db.createCollection("students", function (err, res) { if (err) throw err; console.log("Collection created!"); client.close(); }); }); Write this code in your editor and save with js extension and run this at your terminal. (I...
Keep Reading

QueryString

Last Updated on October 16, 2019
by Pabbly Team
Definition Whenever the situation arises when we need to parse between query string and JSON object then we use 'query string' method which is available in 'query string' module. Querystring is the function which is only used to parse the object from JSON object to query string and vice versa. Node.js Query String Methods The Node.js Query String utility has four methods. The methods are given below  - queryString Parse QueryString.parse() method converts query string into JSON object. var querystring = require('querystring'); var q = querystring.parse('name=Kushal Thadani&company=Magnet Brain Software Technology PVT LTD'); // QueryString.Parse() method converts query string into JSOn...
Keep Reading

Node Package Manager

Last Updated on March 30, 2019
by Pabbly Team
Node Package Manager is a package manager that can be used for the javascript programming language and contains all the files you need for a module. It is the default package manager for the JavaScript runtime environment. There are also many packages which add commands for you to use in the command line. It can manage multiple versions of code and is used on the server side. Node Package Manager provides command line utility to install node.js Package and can get easily installed on any Computer. There are two types of npm package in node.js : Local Package Global Package Local Package If you...
Keep Reading

Node.js – Callbacks Concept

Last Updated on March 9, 2019
by Pabbly Team
A callback works same as a function but it operates asynchronously. The callback function is called immediately after the completion of each task. Callbacks are generally used in Node.js and also in many programming languages. Topics Covered Callback How does a callback work? Blocking call Non-blocking call Callback In Node.js-Callback Concept, all the APIs of Node are coded in a way to support callbacks. Once file Input/Output is complete, it calls the callback function. So there is no blocking or wait for any file I/O. The Node.js is highly scalable because it can process the maximum number of a request...
Keep Reading

Update Document In Database

Last Updated on March 9, 2019
by Pabbly Team
Update one document updateone() method is used to update data in database. This method is a query object that specifies which document to update. It takes three parameters i.e. two query objects(one shows which object is to be updated, other shows the new data) and a callback function. We have to add atomic operators (such as $set, $unset, or $rename) with update if we do not give any operator it will give error. var MongoClient = require('mongodb').MongoClient; // Connection url var url = "mongodb://127.0.0.1:27017/mydb"; // Connect using MongoClient MongoClient.connect(url, function(err, Client) { if (err) throw err; // Database Name mydb...
Keep Reading

Delete Document From Database

Last Updated on March 9, 2019
by Pabbly Team
Delete one: To delete one document from database deleteone() is a method which is used to delete a document in the database. By default it deletes first document from the database. If I pass only brackets(i.e. blank query) it will delete the first document present in the collection. If we want to delete any specific document then we will pass a specific query to deleteOne().  As you can see in the example I have mentioned specific record which I want to delete, here it will delete the first document matched to the query I passed to deleteOne(). var MongoClient = require('mongodb').MongoClient;...
Keep Reading

String Decode

Last Updated on April 13, 2019
by Pabbly Team
Package Must install a string_decode package in your project for using string decode to create buffer object to pass in parameters value in the constructor. npm install  string_decoder --save Definition The String Decoder module provides API for decoding the Buffer objects into strings. It is similar to the buffer.toString() but provides extra support to multi-byte UTF-8 and UTF-16 characters. Which can be accessed using Decode Write Returns a decoded string, secure that any incomplete multibyte characters at the end of the Buffer are dropped from the returned string and stored in an internal buffer for the next call to stringDecoder.write() or...
Keep Reading

Node js EventEmitter

Last Updated on March 30, 2019
by Pabbly Team
Node Js events module has only one class to handle events which is EventEmitter class. It contains all required functions to take care of generating events. All objects that emit events are instances of the EventEmitter class. You might already know about many Node library events like "on data", "on end", "on error", etc. we can say these Node libraries extend EventEmitter. EventEmitter Responsibility EventEmitter class is responsible to generate events. Generating events is also known as Emitting. That's why this class is named as EventEmitter. We can understand this Process through the given Diagram var EventEmitter = require('events').EventEmitter; var light =...
Keep Reading

Node js Email Sending

Last Updated on February 9, 2019
by Pabbly Team
Nodemailer is a module used to send emails using Nodejs applications. It supports Node.js version 6 and further. Nodemailer is licensed by MIT, to use it first we have to install using npm. // Installing package locally C:\Users\Your Name>npm install nodemailer After installing, include it in any application using require( ) function. var nodemailer = require('nodemailer'); To send email first we need a object. // Syntax var transporter = nodemailer.createTransport(transport[, defaults]) //define transport variable inside createTransport() function var transporter = nodemailer.createTransport({ service: 'gmail', //name of email provider auth: { user: '[email protected]', // sender's gmail id pass: 'sender password' // sender...
Keep Reading

Crypto in Node.js

Last Updated on March 30, 2019
by Pabbly Team
Crypto is a module in Node.js which deals with an algorithm that performs data encryption and decryption. This is used for security purpose like user authentication where storing the password in Database in the encrypted form. Crypto module provides set of classes like hash, HMAC, cipher, decipher, sign, and verify. The instance of that class is used to create Encryption and Decryption. Node.js cannot create a class object using the new keyword. Topics Covered Installing  crypto module Requiring crypto module Cipher algorithm - getCiphers() Encryption - crypto.createCipher() Decryption - crypto.createDecipher() To install Crypto module in Node.js in following way. c:\Users\Magnet...
Keep Reading
« Previous 1 2 3 4 5 Next »
f  Join FB Group (17,300+ Members)

Products

  • Pabbly Plus
  • Pabbly Connect
  • Pabbly Email Marketing
  • Pabbly Form Builder
  • Pabbly Subscription Billing
  • Pabbly Email Verification

Resources

  • Video Tutorials
  • Blog
  • API
  • Affiliate Program
  • Integrate Your App
  • Pabbly Tuts

Company Details

  • Terms & Conditions
  • Privacy Policy
  • About Us
  • Brand Assets

Get In Touch

  • Sign Up Free
  • Sign In
  • Support
  • Contact Us
  • Vulnerability Disclosure

Follow Us

Experience the full range of business solutions with Pabbly, including form creation, email marketing, billing, automation, and much more!
f  Join FB Group
Node.js
Node.js
Node.js
  • [email protected]​
  • [email protected]​

Products

  • Pabbly Plus
  • Pabbly Connect
  • Pabbly Email Marketing
  • Pabbly Form Builder
  • Pabbly Subscription Billing
  • Pabbly Email Verification

Resources

  • Video Tutorials
  • Blog
  • API
  • Affiliate Program
  • Integrate Your App
  • Pabbly Tuts

Company Details

  • Terms & Conditions
  • Privacy Policy
  • About Us
  • Brand Assets

Get In Touch

  • Sign Up Free
  • Sign In
  • Support
  • Contact Us
  • Vulnerability Disclosure

Follow Us

Experience the full range of business solutions with Pabbly, including form creation, email marketing, billing, automation, and much more!
f  Join FB Group
Node.js
Node.js
Node.js
  • [email protected]​

Company

  • About Us
  • Privacy Policy
  • Terms & Conditions
  • Careers
  • Security
  • Brand Assets

Learn

  • Pabbly Connect Videos
  • Pabbly Connect Community
  • Pabbly Subscription Billing
    Community

Partners

  • Affiliate Program

Products

  • Pabbly Plus
  • Pabbly Connect
  • Pabbly Email Marketing
  • Pabbly Form Builder
  • Pabbly Email Verification
  • Pabbly Subscription Billing

Developer

  • API - Pabbly Subscription Billing
  • API - Pabbly Email Marketing

Contact

  • [email protected]​
  • Contact Us
  • Support
  • Sales: [email protected]​
  • Contact Us
  • Support Forum
  • Enterprise

Follow Us

f  Join FB Group
Node.js
Node.js
Node.js

Developer

  • API - Pabbly Subscription Billing
  • API - Pabbly Email Marketing

Integrations

  • Pabbly Connect Integrations
  • Integrate Your App

Certification

  • SOC2 Type 1
  • ISO 27001:2022

Company

  • About Us
  • Privacy Policy
  • Terms & Conditions
  • Careers
  • Security
  • Brand Assets

Learn

  • Pabbly Connect Videos
  • Pabbly Connect Community
  • Pabbly Subscription Billing Community

Partners

  • Affiliate Program

Products

  • Pabbly Plus
  • Pabbly Connect
  • Pabbly Email Marketing
  • Pabbly Form Builder
  • Pabbly Email Verification
  • Pabbly Subscription Billing
  • Sales: [email protected]​
  • Contact Us
  • Support Forum
  • Enterprise
  • [email protected]​
  • Contact Us
  • Support Forum
  • Enterprise

Follow Us

f  Join FB Group
Node.js
Node.js
Node.js

Developer

  • API - Pabbly Subscription Billing
  • API - Pabbly Email Marketing

Integrations

  • Pabbly Connect Integrations
  • Integrate Your App

Certification

  • SOC2 Type 1
  • ISO 27001:2022
MagnetBrains LLC DBA Pabbly © 2024. All Rights Reserved.
Sitemap
MagnetBrains LLC DBA Pabbly © 2024. All Rights Reserved.
Sitemap

Company

  • About Us
  • Privacy Policy
  • Terms & Conditions
  • Careers
  • Security
  • Brand Assets

Learn

  • Pabbly Connect Videos
  • Pabbly Connect Community
  • Pabbly Subscription Billing Community
  • Blog

Partners

  • Affiliate Program

Products

  • Pabbly Plus
  • Pabbly Connect
  • Pabbly Subscription Billing
  • Pabbly Email Marketing
  • Pabbly Form Builder
  • Pabbly Hook
  • Pabbly Chatflow
  • Sales: [email protected]​
  • Support: [email protected]​
  • Contact Us
  • Support Forum
  • Enterprise
  • [email protected]​
  • [email protected]​
  • Contact Us
  • Support Forum

Follow Us

f  Join Facebook Group
Node.js
Node.js
Node.js

Developer

  • Pabbly API Documentation

Integrations

  • Pabbly Connect Integrations
  • Integrate Your App

Certification

  • SOC2 Type 2
  • ISO 27001:2022
MagnetBrains LLC DBA Pabbly © 2025. All Rights Reserved.
Sitemap