Page 234 - Nodejs 교과서 개정2판
P. 234

router.get('/',	function(req,	res,	next)	{
           		next('route');
           },	function(req,	res,	next)	{
           		console.log('실행되지	않습니다');
           		next();
           },	function(req,	res,	next)	{
           		console.log('실행되지	않습니다');
           		next();
           });
           router.get('/',	function(req,	res)	{
           		console.log('실행됩니다');
           		res.send('Hello,	Express');
           });




         ਤ ৘ઁ୊ۢ э਷ ઱ࣗ੄ ۄ਋ఠܳ ৈ۞ ѐ ٜ݅যب ؾפ׮  ۄ਋ఠо ݻ ѐٚ рী next()ܳ ഐ୹ೞݶ ׮਺ ޷
         ٜਝযо प೯ؾפ׮


         ୐ ߣ૩ ۄ਋ఠ੄ ୐ ߣ૩ ޷ٜਝযীࢲ next() ؀न next  route')ܳ ഐ୹೮णפ׮  ੉ ҃਋ীח ف ߣ૩  ࣁ
         ߣ૩ ޷ٜਝযо प೯غ૑ ঋणפ׮  ؀न ઱ࣗ৬ ੌ஖ೞח ׮਺ ۄ਋ఠ۽ ֈযцפ׮

         ਬਊೠ ౲੉ ೞա ؊ ੓णפ׮  ۄ਋ఠ ઱ࣗীח ੿ӏ಴അधਸ ࠺܃ೠ ౠࣻ ಁఢਸ ࢎਊೡ ࣻ ੓णפ׮  ৈ۞ о

         ૑ ಁఢ੉ ੓૑݅  ੗઱ ॳ੉ח ಁఢ ೞա݅ ঌইࠁѷणפ׮  ۄ਋౟ ݒѐ߸ࣻۄҊ ܻࠛח ಁఢੑפ׮




           router.get('/user/:id',	function(req,	res)	{
           		console.log(req.params,	req.query);
           });




         ઱ࣗী :idо ੓חؘਃ  ޙ੗ Ӓ؀۽ :idܳ ੄޷ೞח Ѫ੉ ইתפ׮  ੉ ࠗ࠙ীח ׮ܲ чਸ ֍ਸ ࣻ ੓णפ׮  /
         users/1੉ա /users/123 ١੄ ਃ୒ب ੉ ۄ਋ఠо ୊ܻೞѱ ؾפ׮  ੉ ߑध੄ ੢੼਷ :idী ೧׼ೞח 1੉ա 12

         3ਸ ઑഥೡ ࣻ ੓׮ח ੼੉ݴ  req.params ё୓ উী ٜয ੓णפ׮  :idݶ req.params.id۽  :type੉ݶ req.p

         arams.typeਵ۽ ઑഥೡ ࣻ ੓णפ׮

         ױ  ੉ ಁఢਸ ࢎਊೡ ٸ ઱੄ೡ ੼੉ ੓णפ׮  ੌ߈ ۄ਋ఠࠁ׮ ٍী ਤ஖೧ঠ ೠ׮ח Ѫੑפ׮  ׮নೠ ۄ਋ఠ

         ܳ ই਋ܰח ৬ੌ٘஠٘ ৉ೡਸ ೞ޲۽ ੌ߈ ۄ਋ఠࠁ׮ח ٍী ਤ஖೧ঠ ׮ܲ ۄ਋ఠܳ ߑ೧ೞ૑ ঋणפ׮




           router.get('/user/:id',	function(req,	res)	{
           		console.log('얘만	실행됩니다.');
           });
           router.get('/user/like',	function(req,	res)	{
   229   230   231   232   233   234   235   236   237   238   239