Route Parameter and query string in express (Nodejs)
Route Parameter and query string in express (Nodejs). import express from 'express' ; const app = express (); const port = process . env . PORT || '3000' // : it is use for showing dynamic values . app . get ( '/delete/student/:id' ,( req , res ) => { console . log ( req . params ); res . send ( `Student Deleted ${ req . params . id } successfully.` ); }) app . get ( '/product/:category/:id' ,( req , res ) => { console . log ( req . params ); res . send ( `Product Category is ${ req . params . category } and id is ${ req . params . id } ` ); // desturcture // const {id , category } = req.params // res.send(`Product Category is ${category} and id is a ${id}`); }); app . get ( '/product/mobile/:year/and/:month' ,( req , res ) => { const { year , month } = req . params res . send ( `Product Year is ${ year } and months is ${ month ...