Add JWT Authentication to your Swagger API docs

In this tutorial let’s discuss how to add authentication to your Swagger APIs, specifically JWT. Your APIs should be authenticated with some authentication schemes to secure them from online attacks.  Advertisements Once you implement Swagger UI for your RESTful APIs, the next step is add authentication. Swagger supports the following authentication schemes. In this tutorial, … Read more

Pass arguments to your node.js app from pm2

In this post you will learn how to pass arguments to your node.js when you use pm2 to run your node.js application. You can pass arguments to your node.js app using either of the following commands. node index.js dev npm start dev Here I send the value ‘dev’ to the node.js app which can be received using the following … Read more

Compare two dates in JavaScript using moment.js

Moment.js is a great JavaScript library to work with date and time. If you’re looking for a solution to compare two dates in JavaScript, look no further than moment.js. It’s got great stock functions to help you play with date and time. Get current time To get the current time in moment.js you just call moment(). … Read more

Error response from daemon: conflict: unable to delete (must be forced) – image is being used by stopped container – Docker error – How to fix?

In this post you will learn how to fix the Docker error – Error response from daemon: conflict: unable to delete (must be forced) – image is being used by stopped container. This error occurs when you try to delete a docker image. docker rmi 2938e0bbe9a7 Error response from daemon: conflict: unable to delete (must … Read more