@@ -323,7 +323,7 @@ app.get('/', function (req, res) {
323323 res.send('hello world')
324324})
325325
326- </b >
326+ </b >< br />< br />
327327
3283287 . Mostly there are two way method for roting Get and post but it is allowing All also.
329329
@@ -337,15 +337,15 @@ app.get('/about', function (req, res) {
337337 res.send('about')
338338 })
339339
340- </b >
340+ </b >< br />< br />
341341
3423429 . This route path will match acd and abcd. Either b or not.<br />
343343
344344<b >
345345app.get('/ab?cd', function (req, res) {
346346 res.send('ab?cd')
347347 })
348- </b >
348+ </b >< br />< br />
349349
350350 10 . This route path will match abcd, abxcd, abRANDOMcd, ab123cd, and so on.
351351front (ab) and last(cd) and in between any random text you can put.<br />
@@ -354,14 +354,14 @@ front (ab) and last(cd) and in between any random text you can put.<br />
354354app.get('/ab* cd', function (req, res) {
355355 res.send('ab* cd')
356356 })
357- </b >
357+ </b >< br />< br />
358358
359359 11 . This route path will match abcd, abbcd, abbbcd, and so on. You can place mutiple time b.<br />
360360 <b >
361361 app.get('/ab+cd', function (req, res) {
362362 res.send('ab+cd')
363363 })
364- </b >
364+ </b >< br />< br />
365365
366366 12 . <b >Route parameters</b >
367367 Passing the parameter on Route URL
@@ -373,15 +373,15 @@ app.get('/ab*cd', function (req, res) {
373373 app.get('/users/: userId ', function (req, res) {
374374 res.send(req.params)
375375})
376- </b >
376+ </b >< br />< br />
377377
37837813 . If you want passing value whould not mandatory than you can use<br />
379379
380380<b >
381381app.get('/users/: userId ?', function (req, res) {
382382 res.send(req.params)
383383})
384- </b >
384+ </b >< br />< br />
385385
38638614 . You can pass the mutiple paramnter on route URL as like below.
387387Input http://localhost:4000/users/50/books/5
@@ -391,7 +391,7 @@ Input http://localhost:4000/users/50/books/5
391391 app.get('/users/: userId /books/: bookId ', function (req, res) {
392392 res.send(req.params)
393393 })
394- </b >
394+ </b >< br />< br />
395395
396396 15 . You can seperate the parameters also by using -
397397 Input value for that http://localhost:4000/flights/hyderabad-Cg
@@ -401,4 +401,4 @@ Input http://localhost:4000/users/50/books/5
401401 app.get('/flights/:from-: to ', function (req, res) {
402402 res.send(req.params)
403403 })
404- </b >
404+ </b >< br />
0 commit comments