Posts

Showing posts with the label Node JS

Building a Multiroom Chat Application in Node JS

Image
  Github: https://github.com/mehulk05/Chat-app-using-Nodejs Live Url: https://chatapp-using-node.herokuapp.com/ In this tutorial, we will use the Node.js platform to build a  real-time chat application  that sends and shows messages to a recipient instantly without any page refresh. Also, we have some validations like if the username is taken then we will have to choose some other username. If two users are in the same room then only they can see the message of each other Before we start, let’s have a quick look at the prerequisite Prerequisite: Basics of Node.js Good understanding of Javascript Basics of Jquery Node.js Node.js  is an open-source, cross-platform JavaScript run-time environment that executes JavaScript code outside the browser. The most important advantage of using Node is that we can use JavaScript as both a front-end and back-end language. As we know, JavaScript was used primarily for client-side scripting, in which scripts were embedded in a webpag...

Authentication in MERN Stack Using JWT

Image
  Github: https://github.com/mehulk05/Blogapp-using-MERN Live Demo: https://mehulk05.github.io/Blogapp-using-MERN/ A live demo JSON Web Token  is one of the best standards to implement an authentication system in your MERN stack app. In this article, we will just have look at authentication in the MERN stack app using JWT. What is JSON Web Token? JSON Web Token (JWT) is an open standard ( RFC 7519 ) that defines a compact and self-contained way for securely transmitting information between parties as a JSON object When should you use JSON Web Tokens? Here are some scenarios where JSON Web Tokens are useful: Authorization : This is the most common scenario for using JWT. Once the user is logged in, each subsequent request will include the JWT, allowing the user to access routes, services, and resources that are permitted with that token. Single Sign-On is a feature that widely uses JWT nowadays, because of its small overhead and its ability to be easily used across different do...