Pdf generation in Nodejs

PDFs are one of the common documents used in our everyday life. PDF means Portable Document Format, which is used to display documents in an electronic form independent of the software, hardware, or operating system they are viewed on. The main objective of a PDF is to share documents between different operating systems and devices.

PDFs are generally used everywhere some of they are Invoices, eBooks, application form, etc.

In today’s post, we are going to see 2 ways to create PDFs in Node.js.
1. Using Puppeteer.
2. PDF Make package

Puppeteer is a Node library that provides a high-level…

Promise in javascript

A promise is an object which either gives you a result or error in the future as soon as it completes the task. It is a popular design pattern used to handle asynchronous tasks in Node.js. It can take care of parallel/serial execution of many tasks along with their chaining rules. The promise structure also provides effective error-catching mechanisms.

The Promise.resolve() method returns a resolved Promise object with a given value. Depending upon a resolved promise value, it

1. returns promise if fulfilled with promise
2. returns a value if fulfilled with the value
3. …

Flow Diagram of incoming Email handler

Amazon SES is a simple email service used to send and receive emails from your verified domain using any application. AWS SNS is a Simple Notification Service used to notify/publish messages from an application to the subscribed endpoint user/server & customers. In my previous article(read here), I had discussed how to send email using AWS SES, in this article we are going to learn how to receive email using AWS SES & AWS SNS.

Step 1. AWS Setup

  1. Create an AWS account here https://portal.aws.amazon.com/billing/signup#/start
  2. Now go to IAM(Identity and Access Management — IAM user creation is required for giving access to your application to…

AWS SES+SNS+Cloudwatch In Node.js

AWS SES is a Simple Email Service provided by AWS to send emails from any of the applications. AWS SNS is a Simple Notification Service used to notify the subscribed endpoint user/server & sending Messages to the customer. AWS Cloudwatch monitoring service gives you an insight into all the services/resources used by customers.

In today’s post, we will discuss the SES, SNS & Cloudwatch service of AWS using the simple demo. Where you can send email to the customer, notify the server about email delivery/bounce & see the logs of click, spam, bounce, etc of sent email using Cloudwatch. …

Source: Image by Esa Riutta from Pixabay

Excel sheets are popular in the business world as a de facto standard whether we as developers like it not. Sometimes, clients ask us to upload the excel sheet and all the data should be stored in the database. XLSX is a Node package that solves this problem. In this post, we are going to use busboy to process form data.

  1. How to parse the excel sheet into JSON format.
  2. How to create an excel sheet using JSON data.

Step 1: Install the XLSX package using npm or bower

npm i --save xlsx 
bower install js-xlsx

Step 2: Import…

Image by Ag Ku from Pixabay

AWS CloudWatch Logs enables you to centralize the logs from all of your systems, applications, and AWS services that you use, in a single, highly scalable service. You can then easily view them, search them for specific error codes or patterns, filter them based on specific fields, or archive them securely for future analysis.

By default, logs are kept indefinitely and never expire. You can adjust the retention policy for each log group, keep indefinite retention, or choose a retention period between one day and 10 years. You can use CloudWatch Logs to store your log data in highly durable…

  • var — variables declared using var allow you to change the value of variables. Example: var a =13. Scope of variables declared using var is its current execution context and closures thereof, which is either the enclosing function and functions declared within it or, for variables declared outside any function, global.
  • const — variables declared using const do not allow you to change the value once it is defined.
  • let — variable may be reassigned value once it’s declared, such as a counter in a loop. …

Automated testing

Jest is one of the most popular test frameworks used in JavaScript. By writing test cases you can be sure that the newly added feature would be bug-free and won’t affect your existing features. Which makes your application to be more reliable, efficient and also guarantees the quality of an application. The use of third-party services and libraries is a common part of modern projects. It’s easy to test the code written in your project because you have full control over it. …

Promise in JavaScript is a popular design pattern used to handle asynchronous tasks in Node.js. It can take care of parallel/serial execution of many tasks along with their chaining rules. In my previous article, we learned the basics of Promise along with common Promise utility methods.

In this post, we are going to learn about nested promises and alternatives to them. Without wasting any more time, let’s jump into nested promise.

Promises give you return statements and error throwing, which you lose with continuation-passing style. A nested promise is when you call child promise inside .then of parent promise and…

Docker is a popular open-source project written in go and developed by Dot cloud (A PaaS Company). It is basically a container engine that uses the Linux Kernel features like namespaces and control groups to create containers on top of an operating system. In today’s post, I will give you an intro to docker, along with some of the basic commands and FAQs.

Docker Basics

Virtualization lets you split one system into multiple different sections which act like separate, distinct individual systems. This helps developers to run and host multiple OS on the hardware of a single physical server. Hypervisors provide overall…

Shraddha Paghdar

Javascript Full-stack developer with a passion for building highly scalable and performant apps. || https://noob2geek.in/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store