Development Articles, Tutorials & More

FILE UPLOAD USING MULTER

Document Multer is a middleware for handling file uploads in Node.js. It is commonly used in the MERN (MongoDB, Express.js, React, and Node.js) stack to handle file uploads in web applications. In a MERN stack, Multer is typically used in …

LOGIN API

LOGIN API create controller folder and that folder in create userdata.js and add this code. const User = require(“../model/userSchema”); const bcrypt = require(‘bcrypt’); const jwt = require(‘jsonwebtoken’); const login = async(req,res) =>{     try {         …

RAGISTER API

EXAMPLE : RAGISTER API First, create a User model using Mongoose to define the schema for storing user information: const mongoose = require(‘mongoose’); const bcrypt = require(‘bcrypt’); const jwt = require(‘jsonwebtoken’); const userSchema = new mongoose.Schema({     name:{type:String,required:true},   …

WHAT IS CRUD API

A CRUD API is an API that allows users to Create, Read, Update, and Delete (CRUD) data in a system or database. These are the four basic operations that are commonly used in database management. A CRUD API provides a …

WHAT IS REST API

A REST API (Representational State Transfer Application Programming Interface) is an architectural style and a set of constraints that are used to create web services. RESTful APIs are designed to be simple, lightweight, and scalable, making them a popular choice …