I would like to get the url parameter and if url is defined wrongly by user, i need to send an error.
My url is: localhost:8080/user?id=1
If the url entered by the user is: localhost:8080/use?id=1
, how do we handle it?
if (app.get("/user")) {
app.get("/user",function(req,res,next){
console.log('In');
});
} else {
console.log('something went wrong in url');
}