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

IUUQT৬ IUUQ







         IUUQT ݽٕ਷ ਢ ࢲߡী 44- ঐഐചܳ ୶о೤פ׮  (&5੉ա 1045 ਃ୒ਸ ೡ ٸ য়оח ؘ੉ఠܳ ঐഐച೧ࢲ
         ઺рী ׮ܲ ࢎۈ੉ ਃ୒ਸ о۽଻؊ۄب ղਊਸ ഛੋೡ ࣻ হѱ ೤פ׮  ਃ્਷ ۽Ӓੋ੉ա Ѿઁо ೙ਃೠ ହী

         ࢲ IUUQT ੸ਊ੉ ೙ࣻо غח ୶ࣁੑפ׮

         44-੉ ੸ਊػ ਢ ࢎ੉౟ী ߑޙೞݶ Ӓܿ     җ э੉ ࠳ۄ਋੷ ઱ࣗହী ੗ޛ࣭ ಴दо ա২פ׮
















         § Ӓܿ      IUUQT ੸ਊ ചݶ


         ׮਺਷    ੺ী ա৳؍ IUUQ ࢲߡ ௏٘ੑפ׮

          server1.js

           const	http	=	require('http');


           http.createServer((req,	res)	=>	{
           		res.writeHead(500,	{	'Content-Type':	'text/html;	charset=utf-8'	});
           		res.write('<h1>Hello	Node!</h1>');
           		res.end('<p>Hello	Server!</p>');
           })
           		.listen(8080,	()	=>	{	//	서버	연결
           				console.log('8080번	포트에서	서버	대기	중입니다!');
           		});




         ੉ ࢲߡী ঐഐചܳ ੸ਊೞ۰ݶ IUUQT ݽٕਸ ࢎਊ೧ঠ ೤פ׮  ೞ૑݅ IUUQTח ইޖա ࢎਊೡ ࣻ ੓ח Ѫ੉ ই

         תפ׮  ঐഐചܳ ੸ਊೞח ݅ఀ  ӒѪਸ ੋૐ೧઴ ࣻ ੓ח ӝҙب ೙ਃ೤פ׮  ੋૐࢲח ੋૐ ӝҙীࢲ ҳੑ೧
         ঠ ೞݴ  -FUsT &ODSZQU э਷ ӝҙীࢲ ޖܐ۽ ߊә೧઱ӝب ೤פ׮


         ੋૐࢲ ߊә җ੿਷ ࠂ੟ೞҊ بݫੋب ೙ਃೞ޲۽ ੋૐࢲܳ ߊә߉ח ߑߨ਷ ੉ ଼ীࢲ ࣗѐೞ૑ ঋѷणפ׮
         ߊә߉਷ ੋૐࢲо ੓׮ݶ ׮਺җ э੉ ೞݶ ؾפ׮

          server1-3.js

           const	https	=	require('https');
   174   175   176   177   178   179   180   181   182   183   184