Welcome! In this article, we will be developing a secure and lightweight REST API using Node.js, Express server, and MongoDB from scratch that can be used as a backend for authentication systems. This is completely a beginner-friendly article.
As a bonus, I have explained how to create a simple referral system, using which you can share the referral code, and your friends can signup using that code. The concepts we will see throughout this article are completely generic, and it can be implemented using any programming language.
Everyone in this world is busy and we often forget things. Motivated by these two statements, I decided to build a simple cryptocurrency price alert microservice that will send an email notification if the price of a specified coin goes above/below a certain threshold.
You no longer need to stare at the market to check the price all day. All you need to do is choose the currency and specify the threshold price. That’s it. You’ll get notified via the provided email address.
I used Node.js for the implementation. You can follow the steps below and build the same microservice…
In this demo, we will be building a microservice to extract details from the user IP address using Node.js and Express. There may be situations when we need to get some information about the users of our application to provide them a better user experience, like delivering location-based content and so on.
Without wasting much time, let’s get our hands dirty!
First, let us initialize our project by running the npm init -y
command.
Now, we need to install the dependencies.
npm install express geoip-lite --save
Express module will be used for handling http requests from the client.
Geoip-lite will…
Hello all 🖐 In this article, I’d like to share with you some of the important and basic configurations which must be applied before deploying your web application to production. Following only these rules alone is not sufficient, because there are many more things that you must take into account before making your application live. I have created a curated list of things that may help up to some extent. I’ll also share with you more configuration tips and techniques in my upcoming posts as we cannot everything in this single article.
Some code snippets used in this article will…
A plug-and-play starter template that can help you to kick start your web application API development.
In this article, we will be building a basic starter template (or boilerplate)which can be used for building robust and secure REST APIs using Node, Express, and Mongoose. It can be used for any kind of projects regardless of logic and requirements.
You may ask that there are many starter templates and why I am reinventing the wheel. …
Welcome! In this article we will be learning how to manage user sessions using JSON Web Tokens (JWT). At the end we will also build a simple referral system to demonstrate the workflow with JWT.
If you already have a user authentication system, you can refer to this article to integrate JSON web tokens securely in your existing project.
Without wasting more time on the introduction let us get started.
This post is the continuation(Part II) of my previous article, in which I have shown the implementation of user signup with email verification, forgot password and reset password features. …