Author: Vijay SRJ

  • Postman vs Thunder Client for VSCode

    One of the common requirements in web application development is testing your API’s. In an era of API first apps , most of the functionalities in a web app are exposed as APIs to the outer world and to test these you need a tool. Postman has been widely used for this purpose. Postman has…

  • How to send emails in Spring Boot?

    How to send emails in Spring Boot?

    To send emails using the Spring Boot Email Starter in a Spring Boot application, you can do the following: STEP 1: Add the Spring Boot Email Starter dependency to your project: STEP 2: Configure the connection to the email server in your application.properties file: STEP 3 Inject the JavaMailSender bean into your service and use…

  • How to connect to Dynamo DB and do CRUD operations in AWS Serverless ?

    To connect to DynamoDB in the AWS Serverless Framework, you will need to do the following: The AWS SDK for JavaScript is a collection of libraries that allows you to interact with AWS services from your Node.js code. To install the AWS SDK, navigate to the root directory of your serverless application and run the…

  • How to implement retry design pattern in Axios?

    In the microservices world a lot of microservices often communicate with each other through API calls. These calls can often break due to network issues and other problems. It makes sense to retry these calls when these issues happen so that the likelihood of getting a response increases. For node js applications this can be…

  • How to run AWS Serverless in local?

    AWS Lambda is a serverless application. That means you don’t have control over where to deploy your app on AWS. AWS will take care of that. But where and how do you deploy the app locally for your testing. You can do this in two ways: Using Serverless invoke local command: Using this command you…

  • How to set up serverless framework?

    Serverless applications brought about a new paradigm in programming. You no longer need to worry about server infrastructure and concentrate only on your business logic. AWS lambda serves this purpose. And Serverless is a framework that eases the development and deployment of AWS lambdas. Here is how to set up the serverless framework in your…

  • How to decode a JWT token in node js with and without using external libraries?

    OAuth is a very popular authentication mechanism used on web apps. Using Json Web Tokens for authentication is one of OAuth concepts. You can secure your API using JSON Web tokens. The party who calls your API need to send a valid JWT to access your API. This JWT has three parts: header, payload and…

  • What are the differences between HTTPS Node js module and Axios library for making REST API calls

    What are the differences between HTTPS Node js module and Axios library for making REST API calls

    If you are developing a node js project you may need to call third party REST APIs or internal REST APIs from your application. There are many options available to make these calls. Node JS provides its own https module for the same. And we have the more elegant Axios library which you need to…

  • Median of Two Sorted Arrays

    Problem : Given two sorted arrays find the median of the sorted arrays when merged. Find a solution in less than O(n) time complexity where n is the length of the merged array. Also don’t use extra space – Space complexity should be O(1) What is median? Median is the middlemost element of a sorted…

  • Delete Node in a Linked List given only the node

    Problem: You are given a node to delete from a linked list. But you are not given the head node. Delete it in O(1) time and O(1) space complexity. Constraints: For example, Given the linked list : 1 -> 4 -> 7 -> 8 And the node 7 to be deleted The output should be…