Routing in Node.js

What is Routing?
Routing defines the way in which the client or front-end requests are handled by the application endpoints ( Server SIde ).Routing in Node.js

Download Node from here

Implementation of routing in Node.js: There are two ways to implement routing in node.js which are listed below:

  • Framework
  • No Framework

But We will use Normal Routing in Nodejs . Which will be used for CRUD Operation.

Now the below routing is used for CRUD REST API . Get the Full Project Downlead the CRUD in MERN

const express = require('express');
const router = express.Router();

const employeeController = require('../controllers/employee.controller');

// get all employees
router.get('/', employeeController.getEmployeeList);

// get employee by ID

// get Detail by name 

// create new employee'/', employeeController.createNewEmployee);

// update employee
router.put('/:id', employeeController.updateEmployee);

// delete employee

module.exports = router;

Subscribe to My Programming YouTube Channel Before Downloading the code :

Read Our More Tutorials

Live Search with React and NodeJS

CRUD Operation Using React & Nodejs

Building a Simple CRUD App with NodeJS

OTP countdown timer in react

Material UI Table in React

Leave a Reply

Your email address will not be published. Required fields are marked *