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

੊झ೐ۨझ৬ োѾೞ۰ݶ BQQ KTী ׮਺ ࠗ࠙੉ ٜয ੓যঠ ೤פ׮

          app.js

           ...
           app.set('port',	process.env.PORT	||	3000);
           app.set('views',	path.join(__dirname,	'views'));
           app.set('view	engine',	'pug');


           app.use(morgan('dev'));
           ...




         viewsח మ೒݁ ౵ੌٜ੉ ਤ஖ೠ ಫ؊ܳ ૑੿ೞח Ѫੑפ׮  res.render ݫࢲ٘о ੉ ಫ؊ ӝળਵ۽ మ೒݁ ূ

         ૓ਸ ଺ইࢲ ۪؊݂೤פ׮  res.render('JOEFY')ۄݶ WJFXT JOEFY QVHܳ ۪؊݂೤פ׮  res.render('admi
         n/main')੉ۄݶ WJFXT BENJO NBJO QVHܳ ۪؊݂೤פ׮


         WJFX engine਷ যځೠ ઙܨ੄ మ೒݁ ূ૓ਸ ࢎਊೡ૑ܳ աఋշפ׮  അ੤ pug۽ ࢸ੿غয ੓ਵ޲۽ Ӓ؀۽ ࢎ
         ਊೞݶ ؾפ׮


         ੉ઁࠗఠ ಌӒ੄ ޙߨਸ ঌইࠁݶࢲ )5.-җח যڌѱ ׮ܲ૑ ࢓ಝࠇद׮

          
                 )5.- ಴അ
         ӝઓ )5.-җ ׮ܰѱ ച࢓Қഐ <	>)৬ ײח కӒо হणפ׮  చ ژח झಕ੉झ۽݅ కӒ੄ ࠗݽ ੗ध ҙ҅ܳ

         ӏݺ೤פ׮  చ ೠ ߣ  झಕ੉झ ف ߣ ژח झಕ੉झ ֎ ߣ ݽف ࢚ҙহणפ׮  ݽٚ ౵ੌী زੌೠ ઙܨ੄ ٜৈ
         ॳӝܳ ੸ਊೞݶ ؾפ׮  ੗ध కӒח ࠗݽ కӒࠁ׮ ٜৈॳӝغয ੓যঠ ೤פ׮  ٜৈॳӝী য়ܨо ੓ਵݶ ઁ

         ؀۽ ۪؊݂غ૑ ঋਵפ ઱੄ೞӡ ߄ۉפ׮

         doctype html਷ <!DOCTYPE html>җ эणפ׮  html  head  title కӒীࢲח ੗ध కӒੌࣻ۾ ೠ ױ҅ঀ ؊ ٜ

         ৈॳӝغয ੓ח ݽणਸ ࠅ ࣻ ੓णפ׮  title= title ࠗ࠙਷        ੺ীࢲ ׮ܛפ׮

         ച࢓Қഐо হਵ޲۽ కӒ੄ ࣘࢿب ઑӘ ׮ܰѱ ಴അ೤פ׮  కӒݺ ٍী ࣗҚഐ۽ ޘয ੸णפ׮


                                  ಌӒ                                                  )5.-

           doctype	html                                        <!DOCTYPE	html>

           html                                                <html>
           		head                                              		<head>
           				title=	title                                    				<title>익스프레스</title>
           				link(rel='stylesheet',	href='/stylesheets/st    				<link	rel="stylesheet"	href="/style.css"	/>

           yle.css')                                           		</head>
                                                               </html>
   235   236   237   238   239   240   241   242   243   244   245