Category: nodejs

  • How to create HTTP/REST APIs using AWS Serverless framework?

    How to create HTTP/REST APIs using AWS Serverless framework?

    HTTP/REST APIs have become the defacto standard of communication between most web applications. You can create an API and deploy it on a server or on the cloud or go serverless . To go serverless you can use a tool like AWS lambda. And to ease the development and deployment of AWS lambda you can…

  • 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…