¹é°ßºÒ¿©ÀÏŸ Node.js·Î ¼¹ö ¸¸µé±â
ºü¸£°Ô ½Ç¹«Çü Node.js °³¹ßÀÚ°¡ µÉ ¼ö ÀÖµµ·Ï µµ¿ÍÁÖ´Â ½Ç½ÀÇü ÀÔ¹®¼´Ù. 5ÁÙ·Î ¸¸µå´Â Node.js ¼¹ö·Î ÇÙ½É °³³äÀ» ÆľÇÇÏ°í, µ¥ÀÌÅͺ£À̽º ¿¬µ¿, ½Ç½Ã°£ Åë½Å ½Ç½ÀÀ» ÅëÇØ ½Ç¹«Çü °³¹ß Áö½ÄÀ» ½ÀµæÇÑ ÈÄ, ÆäÀ̽ººÏ Ŭ·Ð ÄÚµù°ú ¹èÆ÷·Î ÅëÇÕ ½Ç½ÀÀ» Çغ¼ ¼ö ÀÖ°Ô ´Ü°èÀûÀ¸·Î ±¸¼ºÇÏ¿´´Ù. ÆäÀ̽ººÏ Ŭ·Ð ÇÁ·ÎÁ§Æ®´Â óÀ½¿£ µû¶óÇØ º¸°í, ±× ´ÙÀ½¿£ ¾È º¸°í ¸¸µé¾î º¸°í, ±× ´ÙÀ½¿£ ÀÀ¿ëÇؼ Á»´õ È®ÀåµÈ ¿©·¯ ºÐÀÇ ¹öÀüÀ» ¸¸µé¾î º¸±æ ¹Ù¶õ´Ù.
°Ç±¹´ë ¼ÒÇÁÆ®¿þ¾î°øÇаú¸¦ Á¹¾÷ÇÏ¿´À¸¸ç, °ú°Å ÆÄÀ̽ã ÄÉ¶ó½º ¹× Node.js ½ºÅÃÀ» ´Ù·ç¸ç 꺿 ÇÁ·ÎÁ§Æ®¿¡ Âü¿©Çß°í ÇöÀç ¿©Çà »ê¾÷¿¡¼ Tech¸¦ Àû¿ëÇϱâ À§ÇÑ Å×Å©Åõ¾î ½ºÅ¸Æ®¾÷¿¡¼ °³¹ßÀÚ·Î ±Ù¹« ÁßÀÌ´Ù. Àü°ø°úÁ¤ ¹× Å©°í ÀÛÀº ÇÁ·ÎÁ§Æ®¸¦ ÅëÇØ ½ÀµæÇÑ Computer Science Áö½ÄÀ» ÀÌÇØÇϱ⠽±°Ô Àü´ÞÇϱâ À§ÇØ °³¹ß ºí·Î±×¸¦ ¿î¿µ ÁßÀ̸ç, °³¹ßÀÚ¸¸À» À§ÇÑ °³¹ß ¹®È°¡ ¾Æ´Ñ ´Ù¾çÇÑ »ç¶÷µé°ú ÇÔ²²ÇÏ´Â °³¹ß ¹®È¸¦ ¸¸µé¾î°¡´Â µ¥ °ü½ÉÀÌ ¸¹´Ù
¸ñÂ÷ÁöÀºÀÌÀÇ ±Û ÀÏ·¯µÎ±â 1Àå. Node.js ù°ÉÀ½1.1 Node.js ù°ÉÀ½ À¥ ¼¹ö¿Í Node.jsÀÇ °ü°è Node.js°¡ µ¿ÀÛÇÏ´Â ¹æ½Ä 1.2 ½Ç½ÀÀ» À§ÇÑ °³¹ßȯ°æ ±¸Ãà Node.js ¼³Ä¡ IDE(ÅëÇÕ°³¹ßȯ°æ) ¼³Ä¡-ºñÁÖ¾ó ½ºÆ©µð¿À ÄÚµå(Visual Studio Code, VS Code) Á¤¸®Çغ¾½Ã´Ù ³ªÀÇ ÀÌÇصµ¸¦ ÃøÁ¤ÇÏÀÚ 2Àå. ÀÚ¹Ù½ºÅ©¸³Æ® ¸®¸¶Àεå2.1 ÀÚ¹Ù½ºÅ©¸³Æ® ±âº» ¹®¹ý º¯¼ö, È£À̽ºÆÃ, Ŭ·ÎÀú °´Ã¼¿Í ¹è¿ ÇÔ¼ö ÇÁ·ÎÅäŸÀÔ°ú »ó¼Ó 2.2 ÀÚ¹Ù½ºÅ©¸³Æ®ÀÇ ºñµ¿±â ó¸® Äݹé ÇÔ¼ö Promise async/await ºñµ¿±â »óȲ¿¡¼ÀÇ ¿¹¿Ü ó¸® Á¤¸®Çغ¾½Ã´Ù ³ªÀÇ ÀÌÇصµ¸¦ ÃøÁ¤ÇÏÀÚ [ÇÔ²²ÇغÁ¿ä 2-1] º¯¼ö È£À̽ºÆà (sample01.js) [ÇÔ²²ÇغÁ¿ä 2-2] letÀ» »ç¿ëÇÑ º¯¼ö È£À̽ºÆà ¹®Á¦ ÇØ°á (sample02-1.js) [ÇÔ²²ÇغÁ¿ä 2-3] const¸¦ »ç¿ëÇÑ º¯¼ö È£À̽ºÆà ¹®Á¦ ÇØ°á (sample02-2.js) [ÇÔ²²ÇغÁ¿ä 2-4] function-level-scopeÀÇ »ç¿ë ¨ç (sample03.js) [ÇÔ²²ÇغÁ¿ä 2-5] function-level-scopeÀÇ »ç¿ë ¨è (sample04.js) [ÇÔ²²ÇغÁ¿ä 2-6] constÀÇ Æ¯Â¡ (sample05-1.js) [ÇÔ²²ÇغÁ¿ä 2-7] letÀÇ Æ¯Â¡ (sample05-1.js) [ÇÔ²²ÇغÁ¿ä 2-8] Ŭ·ÎÀúÀÇ °³³ä (sample06.js) [ÇÔ²²ÇغÁ¿ä 2-9] °´Ã¼¿Í ÇÁ·ÎÆÛƼ (sample07.js) [ÇÔ²²ÇغÁ¿ä 2-10] °´Ã¼ ¹è¿ »ý¼º (sample08.js) [ÇÔ²²ÇغÁ¿ä 2-11] ±¸Á¶ ºÐÇØ ÇÒ´ç (sample09.js) [ÇÔ²²ÇغÁ¿ä 2-12] ÇÔ¼öÀÇ ¼±¾ð (sample10.js) [ÇÔ²²ÇغÁ¿ä 2-13] È»ìÇ¥ ÇÔ¼öÀÇ ¼±¾ð (sample11.js) [ÇÔ²²ÇغÁ¿ä 2-14] thisÀÇ »ç¿ë (sample12.js) [ÇÔ²²ÇغÁ¿ä 2-15] bind ÇÔ¼ö »ç¿ë (sample12-2.js) [ÇÔ²²ÇغÁ¿ä 2-16] ÇÁ·ÎÅäŸÀÔÀ» ÀÌ¿ëÇÑ °´Ã¼ »ý¼º (sample13.js) [ÇÔ²²ÇغÁ¿ä 2-17] ÇÁ·ÎÅäŸÀÔ°ú »ó¼Ó (sample14.js) [ÇÔ²²ÇغÁ¿ä 2-18] Prototype Chaining (sample15.js) [ÇÔ²²ÇغÁ¿ä 2-19] ÇÁ·ÎÅäŸÀÔÀ» Ŭ·¡½ºÃ³·³ »ç¿ëÇغ¸±â (sample16.js) [ÇÔ²²ÇغÁ¿ä 2-20] Äݹé ÇÔ¼öÀÇ ºñµ¿±â ó¸® (sample17.js) [ÇÔ²²ÇغÁ¿ä 2-21] Äݹé ÇÔ¼öÀÇ µ¿±â ó¸® (sample18.js) [ÇÔ²²ÇغÁ¿ä 2-22] »ç¿ëÀÚ Á¤ÀÇ ÇÔ¼öÀÇ µ¿±â ó¸® (sample19.js) [ÇÔ²²ÇغÁ¿ä 2-23] APIÀÇ ºñµ¿±âÀû ó¸® (sample20.js) [ÇÔ²²ÇغÁ¿ä 2-24] ÀÏ¹Ý ºñµ¿±â ÇÔ¼ö (sample21-1.js) [ÇÔ²²ÇغÁ¿ä 2-25] µ¿±âÀû ó¸® ¨ç (sample21-2.js) [ÇÔ²²ÇغÁ¿ä 2-26] µ¿±âÀû ó¸® ¨è (sample21-3.js) [ÇÔ²²ÇغÁ¿ä 2-27] PromiseÀÇ »ç¿ë (sample22.js) [ÇÔ²²ÇغÁ¿ä 2-28] Promise °´Ã¼¿Í async/await (sample23.js) [ÇÔ²²ÇغÁ¿ä 2-29] async/awaitÀÇ »ç¿ë (sample24.js) [ÇÔ²²ÇغÁ¿ä 2-30] »ç¿ëÀÚ Á¤ÀÇ ¿À·ù (sample25.js) [ÇÔ²²ÇغÁ¿ä 2-31] ÀϹÝÀûÀÎ ¿¹¿Ü ó¸® (sample26.js) [ÇÔ²²ÇغÁ¿ä 2-32] .catch( )ÀÇ ÀÌ¿ë (sample27.js) [ÇÔ²²ÇغÁ¿ä 2-33] .then( )ÀÇ ÀÌ¿ë (sample27.js) [ÇÔ²²ÇغÁ¿ä 2-34] async/awaitÀÇ ¿¹¿Ü ó¸® ¨ç (sample28-1.js) [ÇÔ²²ÇغÁ¿ä 2-35] async/awaitÀÇ ¿¹¿Ü ó¸® ¨è (sample28-2.js) [ÇÔ²²ÇغÁ¿ä 2-36] async/awaitÀÇ ¿¹¿Ü ó¸® ¨é (sample28-3.js) [ÇÔ²²ÇغÁ¿ä 2-37] async/awaitÀÇ ¿¹¿Ü ó¸® ¨ê (sample28-4.js) 3Àå. 5ÁÙ·Î ¸¸µå´Â ¼¹ö3.1 ÇÁ·ÎÁ§Æ®ÀÇ ½ÃÀÛ ÇÁ·ÎÁ§Æ® ¼³Á¤Çϱâ NPM ¸í·É¾î 3.2 Node.jsÀÇ ¸ðµâ°ú °´Ã¼ ¸ðµâ ½Ã½ºÅÛÀ̶õ? ¸ðµâÀÇ Á¾·ù 3.3 http ¸ðµâ·Î ¼¹ö ¸¸µé±â 5ÁÙ·Î ¼¹ö¸¦ ¸¸µé¾îº¸ÀÚ ¿äû °´Ã¼(req), ÀÀ´ä °´Ã¼(res) 3.4 express ¸ðµâÀ» »ç¿ëÇØ ¼¹ö ¸¸µé±â express¶õ? express ¼³Ä¡¿Í »ç¿ë http ¿äû ¸Þ¼µå-GET, POST, PUT, PATCH, DELETE 3.5 express¿Í ¹Ìµé¿þ¾î ¹Ìµé¿þ¾î¶õ? ÀÚÁÖ »ç¿ëÇÏ´Â ¹Ìµé¿þ¾î Á¤¸®Çغ¾½Ã´Ù ³ªÀÇ ÀÌÇصµ¸¦ ÃøÁ¤ÇÏÀÚ [ÇÔ²²ÇغÁ¿ä 3-1] A.js ¼Ò½º ÄÚµå (chapter03/sample/A.js) [ÇÔ²²ÇغÁ¿ä 3-2] B.js ¼Ò½º ÄÚµå (chapter03/sample/B.js) [ÇÔ²²ÇغÁ¿ä 3-3] ¼øȯ ÂüÁ¶ ¨ç (chapter03/sample/A2.js) [ÇÔ²²ÇغÁ¿ä 3-4] ¼øȯ ÂüÁ¶ ¨è (chapter03/sample/B2.js) [ÇÔ²²ÇغÁ¿ä 3-5] 5ÁÙ·Î ¸¸µå´Â ¼¹ö (chapter03/sample/simple_server.js) [ÇÔ²²ÇغÁ¿ä 3-6] À¥ ÆäÀÌÁöÀÇ ¿äû¿¡ ´ëÇÑ ÀÀ´ä (chapter03/sample/simple_server2.js) [ÇÔ²²ÇغÁ¿ä 3-7] ¹®ÀÚ¿À» º¸³»´Â ÀÀ´ä ÄÚµå (chapter03/sample/simple_server3.js) [ÇÔ²²ÇغÁ¿ä 3-8] fs-test.html ÀÛ¼º (chapter03/sample/fs_test.html) [ÇÔ²²ÇغÁ¿ä 3-9] ÆÄÀÏÀ» º¸³»´Â ÀÀ´ä ÄÚµå (chapter03/sample/fs_test.js) [ÇÔ²²ÇغÁ¿ä 3-10] request¿Í response È®ÀÎ (chapter03/sample/simple_sever3.js) [ÇÔ²²ÇغÁ¿ä 3-11] REST¸¦ ÅëÇÑ ÆäÀÌÁö »ý¼º (chapter03/sample/simple_sever4.js) [ÇÔ²²ÇغÁ¿ä 3-12] express »ç¿ë¹ý ¨ç (chapter03/express/express_study1.js) [ÇÔ²²ÇغÁ¿ä 3-13] express·Î À¥ ÆäÀÌÁö ¸¸µé±â (chapter03/express/index.html) [ÇÔ²²ÇغÁ¿ä 3-14] express »ç¿ë¹ý ¨è (chapter03/express/express_study2.js) [ÇÔ²²ÇغÁ¿ä 3-15] ¹Ìµé¿þ¾î »ç¿ë¹ý ¨ç (chapter03/express/express-study3.js) [ÇÔ²²ÇغÁ¿ä 3-16] ¹Ìµé¿þ¾î »ç¿ë¹ý ¨è (chapter03/express/express_study4.js) [ÇÔ²²ÇغÁ¿ä 3-17] ¿À·ù 󸮸¦ À§ÇÑ ¹Ìµé¿þ¾î ÇÔ¼ö (chapter03/express/express_study5.js) [ÇÔ²²ÇغÁ¿ä 3-18] static ¹Ìµé¿þ¾î »ç¿ë ¨ç (chapter03/express/express-study6.js) [ÇÔ²²ÇغÁ¿ä 3-19] static ¹Ìµé¿þ¾î »ç¿ë ¨è (chapter03/express/index2.html) [ÇÔ²²ÇغÁ¿ä 3-20] ¹Ìµé¿þ¾î¸¦ ÀÌ¿ëÇÑ ¿¹Á¦ ¨ç (chapter03/express/express_study7.js) [ÇÔ²²ÇغÁ¿ä 3-21] ÄíÅ° Àü´Þ (chapter03/sample/cookie.js) [ÇÔ²²ÇغÁ¿ä 3-22] ¼¼¼ÇÀ» ÅëÇÑ Å° °ª »ý¼º (chapter03/sample/cookie-session.js) [ÇÔ²²ÇغÁ¿ä 3-23] ¹Ìµé¿þ¾î ÅëÇÕ Å×½ºÆ® (chapter03/express/express_study8.js) 4Àå. Åë½ÅÀ» ±¸ÇöÇغ¸ÀÚ4.1 API API¶õ? Open API È°¿ë ¨ç-request Open API È°¿ë ¨è-axios dotenv »ç¿ëÇϱâ 4.2 ij½Ì ±¸ÇöÇϱâ Redis¶õ? 4.3 API ¼¹ö¸¦ Á÷Á¢ ¸¸µå´Â ¹æ¹ý REST API API ¼¹ö ¸¸µé±â API ¼¹ö Å×½ºÆ® : CORS 4.4 À¥ ÆÄ½Ì Å©·Ñ¸µ, ½ºÅ©·¡ÇÎ, ÆÄ½Ì Á¤¸®Çغ¾½Ã´Ù ³ªÀÇ ÀÌÇصµ¸¦ ÃøÁ¤ÇÏÀÚ [ÇÔ²²ÇغÁ¿ä 4-1] request ¸ðµâ·Î ³×À̹ö API »ç¿ëÇغ¸±â (chapter04/sample/naver_request.js) [ÇÔ±úÇغÁ¿ä 4-2] axios ¸ðµâ·Î ¿¡¾îÄÚ¸®¾Æ API »ç¿ëÇغ¸±â (chapter04/sample/airkorea_axios.js) [ÇÔ²²ÇغÁ¿ä 4-3] ¿¡¾îÄÚ¸®¾Æ API ÀÀ´ä °á°ú °¡Á®¿À±â (chapter04/sample/airkorea_axios2.js) [ÇÔ²²ÇغÁ¿ä 4-4] [ÇÔ²²ÇغÁ¿ä 4-3]¿¡ dotenv ¸ðµâ Àû¿ë (chapter04/sample/airkorea_dotenv.js) [ÇÔ²²ÇغÁ¿ä 4-5] Redis ¼¹ö Å×½ºÆ® ¨ç (chapter04/sample/redis.js) [ÇÔ²²ÇغÁ¿ä 4-6] Redis ¼¹ö Å×½ºÆ® ¨è (chapter04/sample/redis2.js) [ÇÔ²²ÇغÁ¿ä 4-7] [ÇÔ²²ÇغÁ¿ä 4-3]¿¡ ij½Ã Àû¿ëÇϱâ (chapter04/sample/redis3.js) [ÇÔ²²ÇغÁ¿ä 4-8] ³» API ¼¹ö ¸¸µé±â (chapter04/sample/colon_path.js) [ÇÔ²²ÇغÁ¿ä 4-9] °£´ÜÇÑ °Ô½ÃÆÇ API ¼¹ö ¸¸µé±â (chapter04/sample/board_api.js) [ÇÔ²²ÇغÁ¿ä 4-10] uuid-apikey ¸ðµâ »ç¿ë (chapter04/sample/uuid_apikey.js) [ÇÔ²²ÇغÁ¿ä 4-11] °Ô½ÃÆÇ¿¡ uuid-apikey Ãß°¡Çϱâ (chapter04/sample/board_api2.js) [ÇÔ²²ÇغÁ¿ä 4-12] °Ô½ÃÆÇ API ¼¹ö Å×½ºÆ® (chapter04/sample/board_api_test.js) [ÇÔ²²ÇغÁ¿ä 4-13] °Ô½ÃÆÇ API ¼¹ö Å×½ºÆ® ÄÚµå ÀÛ¼º (chapter04/sample/board_api_test.html) [ÇÔ²²ÇغÁ¿ä 4-14] cors ¸ðµâ ¼³Ä¡ (chapter04/sample/board_api3.js) [ÇÔ²²ÇغÁ¿ä 4-15] À¥ ÆäÀÌÁö Å©·Ñ¸µ (chapter04/sample/crawling.js) 5Àå. Node.js¿Í µ¥ÀÌÅͺ£À̽º5.1 SQL°ú NoSQL SQL NoSQL 5.2 SQL : MySQL °³¹ßȯ°æ ¼³Á¤ Äõ¸® ±âº» »ç¿ë¹ý Äõ¸®¹® ÀÛ¼ºÇϱâ ORM : Sequelize 5.3 NoSQL : MongoDB MongoDB Á¤¸®Çغ¾½Ã´Ù ³ªÀÇ ÀÌÇصµ¸¦ ÃøÁ¤ÇÏÀÚ [ÇÔ²²ÇغÁ¿ä 5-1] µ¥ÀÌÅͺ£À̽º Á¤º¸ ÀúÀå (chapter05/sequelize/config/config.json) [ÇÔ²²ÇغÁ¿ä 5-2] customer °´Ã¼¸¦ ORM·Î ÀÛ¼ºÇϱâ (chapter05/sequelize/models/customer.js) [ÇÔ²²ÇغÁ¿ä 5-3] purchase ¸ðµ¨ »ý¼º (chapter05/sequlieze/models/purchase.js) [ÇÔ²²ÇغÁ¿ä 5-4] index.js ¼öÁ¤ (chapter05/sequelize/models/index.js) [ÇÔ²²ÇغÁ¿ä 5-5] Å×ÀÌºí °ü°è »ý¼º (chapter05/sequelize/app.js ) [ÇÔ²²ÇغÁ¿ä 5-6] Ŭ¶óÀ̾ðÆ® È¸é »ý¼º (chapter05/sequelize/customer.html) [ÇÔ²²ÇغÁ¿ä 5-7] Á¤º¸ ÀÔ·Ââ ¼¹ö ÄÚµå (chapter05/sequelize/app2.js) [ÇÔ²²ÇغÁ¿ä 5-8] mongoose¿Í MongoDB ¿¬°áÇϱâ (chapter05/mongoose/app.js) 6Àå. ½Ç½Ã°£ Åë½ÅÀ» ±¸ÇöÇغ¸ÀÚ6.1 À¥ ¼ÒÄÏ HTTP¿Í AJAX À¥ ¼ÒÄÏ 6.2 WS ¸ðµâ·Î À¥ ¼ÒÄÏ ±¸ÇöÇϱâ 6.3 socket.io·Î ½Ç½Ã°£ äÆà ±¸ÇöÇϱâ 6.4 ½Ç½Ã°£ äÆà ±¸ÇöÇϱâ Á¤¸®Çغ¾½Ã´Ù ³ªÀÇ ÀÌÇصµ¸¦ ÃøÁ¤ÇÏÀÚ [ÇÔ²²ÇغÁ¿ä 6-1] ws ¸ðµâÀ» ÀÌ¿ëÇÑ WebSocket ±¸Çö (chapter06/ws/socket.js) [ÇÔ²²ÇغÁ¿ä 6-2] Ŭ¶óÀ̾ðÆ® ÄÚµå ÀÛ¼º (chapter06/ws/index.html) [ÇÔ²²ÇغÁ¿ä 6-3] WebSocket ¼¹ö ÄÚµå (chapter06/ws/app.js) [ÇÔ²²ÇغÁ¿ä 6-4] socket.io ¸ðµâ ºÒ·¯¿À±â (chapter06/socket.io/app.js) [ÇÔ²²ÇغÁ¿ä 6-5] SocketIO ÀνºÅϽº »ý¼º (chapter06/socket.io/socket.js) [ÇÔ²²ÇغÁ¿ä 6-6] SocketIO Ŭ¶óÀ̾ðÆ® ÄÚµå (chapter06/socket.io/index.html) [ÇÔ²²ÇغÁ¿ä 6-7] SocketIO Ŭ¶óÀ̾ðÆ® Äڵ忡 polling Ãß°¡ (chapter06/socket.io/index.html) [ÇÔ²²ÇغÁ¿ä 6-8] ½Ç½Ã°£ äÆÃâ ±¸ÇöÇϱâ (chapter06/chat/app.js) [ÇÔ²²ÇغÁ¿ä 6-9] CSS ÆÄÀÏ »ý¼º (chapter06/chat/index.css) [ÇÔ²²ÇغÁ¿ä 6-10] ½Ç½Ã°£ äÆÃâ Ŭ¶óÀ̾ðÆ® ÄÚµå ¨ç (chapter06/chat/index.html) [ÇÔ²²ÇغÁ¿ä 6-11] ½Ç½Ã°£ äÆÃâ Ŭ¶óÀ̾ðÆ® ÄÚµå ¨è (chapter06/chat/index.html) 7Àå. ÅäÀÌ ÇÁ·ÎÁ§Æ® : ÆäÀ̽ººÏ Ŭ·Ð ÄÚµù7.1 passport passport¶õ? passport »ç¿ëÇϱâ 7.2 ÅÛÇø´ ¿£Áø Á¤Àû ÆÄÀÏ°ú µ¿Àû ÆÄÀÏ ÅÛÇø´ ¿£Áø 7.3 ÅäÀÌ ÇÁ·ÎÁ§Æ® : ÆäÀ̽ººÏ Ŭ·Ð ÄÚµù Á¤¸®Çغ¾½Ã´Ù ³ªÀÇ ÀÌÇصµ¸¦ ÃøÁ¤ÇÏÀÚ [ÇÔ²²ÇغÁ¿ä 7-1] ȸ¿ø°¡ÀÔ È¸é ÄÚµå (chapter07/ex_passport/index.html) [ÇÔ²²ÇغÁ¿ä 7-2] passport¸¦ ÀÌ¿ëÇÑ È¸¿ø°¡ÀÔ ¼¹ö ÄÚµå (chapter07/ex_passport/app.js 1~32Çà) [ÇÔ²²ÇغÁ¿ä 7-3] passport¸¦ ÀÌ¿ëÇÑ È¸¿ø°¡ÀÔ ¼¹ö ÄÚµå ¼öÁ¤ ¨ç (chapter07/ex_passport/app.js 34~62Çà) [ÇÔ²²ÇغÁ¿ä 7-4] passport¸¦ ÀÌ¿ëÇÑ È¸¿ø°¡ÀÔ ¼¹ö ÄÚµå ¼öÁ¤ ¨è (chapter07/ex_passport/app.js 64~119Çà) [ÇÔ²²ÇغÁ¿ä 7-5] index.js ÆÄÀÏ »ý¼º (chapter07/ejs/index.js) [ÇÔ²²ÇغÁ¿ä 7-6] index.ejs ÆÄÀÏ »ý¼º (chapter07/ejs/views/index.ejs) [ÇÔ²²ÇغÁ¿ä 7-7] head.js ÆÄÀÏ ÀÛ¼º (Chapter07/ejs/views/partials/head.ejs) [ÇÔ²²ÇغÁ¿ä 7-8] header.ejs ÆÄÀÏ ÀÛ¼º (Chapter07/ejs/views/partials/header.ejs) [ÇÔ²²ÇغÁ¿ä 7-9] footer.ejs ÆÄÀÏ ÀÛ¼º (Chapter07/ejs/views/partials/footer.ejs) [ÇÔ²²ÇغÁ¿ä 7-10] Á¶°¢³ ÆÄÀÏÀ» Çϳª·Î ¸ðÀ¸±â (Chapter07/ejs/views/index2.ejs) [ÇÔ²²ÇغÁ¿ä 7-11] ¸Þ´ºÀÇ ¶ó¿ìÅ͸¦ index2.js¿¡¼ »ý¼º (Chapter07/ejs/index2.js) [ÇÔ²²ÇغÁ¿ä 7-12] package.json ÆÄÀÏ ¼öÁ¤ (facebook-clone/package.json 6~8Çà) [ÇÔ²²ÇغÁ¿ä 7-13] app.js ÆÄÀÏ ¼öÁ¤ ¨ç (facebook-clone/app.js 1~11Çà) [ÇÔ²²ÇغÁ¿ä 7-14] app.js ÆÄÀÏ ¼öÁ¤ ¨è (facebook-clone/app.js 13~22Çà) [ÇÔ²²ÇغÁ¿ä 7-15] app.js ÆÄÀÏ ¼öÁ¤ ¨é (facebook-clone/app.js 24~32Çà) [ÇÔ²²ÇغÁ¿ä 7-16] .env ÆÄÀÏ »ý¼º (facebook-clone/.env) [ÇÔ²²ÇغÁ¿ä 7-17] app.js ÆÄÀÏ ¼öÁ¤ ¨ê (facebook-clone/app.js 34~44Çà) [ÇÔ²²ÇغÁ¿ä 7-18] app.js ÆÄÀÏ ¼öÁ¤ ¨ë (facebook-clone/app.js 46~58Çà) [ÇÔ²²ÇغÁ¿ä 7-19] app.js ÆÄÀÏ ¼öÁ¤ ¨ì (facebook-clone/app.js 60~67Çà) [ÇÔ²²ÇغÁ¿ä 7-20] app.js ÆÄÀÏ ¼öÁ¤ ¨í (facebook-clone/app.js 69~75Çà) [ÇÔ²²ÇغÁ¿ä 7-21] app.js ÆÄÀÏ ¼öÁ¤ ¨î (facebook-clone/app.js 77~110Çà) [ÇÔ²²ÇغÁ¿ä 7-22] User.js ÆÄÀÏ ÀÛ¼º (facebook-clone/models/User.js) [ÇÔ²²ÇغÁ¿ä 7-23] Post.js ÆÄÀÏ ÀÛ¼º (facebook-clone/models/Post.js) [ÇÔ²²ÇغÁ¿ä 7-24] Comment.js ÆÄÀÏ ÀÛ¼º (facebook-clone/models/Comment.js) [ÇÔ²²ÇغÁ¿ä 7-25] User.js ÆÄÀÏ ¼öÁ¤ ¨ç (facebook-clone/routes/user.js 1~22Çà) [ÇÔ²²ÇغÁ¿ä 7-26] User.js ÆÄÀÏ ¼öÁ¤ ¨è (facebook-clone/routes/users.js 24~29Çà) [ÇÔ²²ÇغÁ¿ä 7-27] .env ÆÄÀÏ ÀÛ¼º (facebook-clone/.env) [ÇÔ²²ÇغÁ¿ä 7-28] User.js ÆÄÀÏ ¼öÁ¤ ¨é (fackebook-clone/routes/users.js 31~38Çà) [ÇÔ²²ÇغÁ¿ä 7-29] User.js ÆÄÀÏ ¼öÁ¤ ¨ê (facebook-clone/routes/users.js 40~83Çà) [ÇÔ²²ÇغÁ¿ä 7-30] User.js ÆÄÀÏ ¼öÁ¤ ¨ë (facebook-clone/routes/users.js 85~119Çà) [ÇÔ²²ÇغÁ¿ä 7-31] User.js ÆÄÀÏ ¼öÁ¤ ¨ì (facebook-clone/routes/users.js 121~278Çà) [ÇÔ²²ÇغÁ¿ä 7-32] User.js ÆÄÀÏ ¼öÁ¤ ¨í (facebook-clone/routes/users.js 280~298Çà) [ÇÔ²²ÇغÁ¿ä 7-33] post.js ÆÄÀÏ ÀÛ¼º (facebook-clone/routes/posts.js) 8Àå. ¼¹ö¸¦ ¹èÆ÷Çغ¸ÀÚ8.1 ±âº» Áغñ cross-env ¼³Á¤Çϱâ morgan, winston ¼³Á¤Çϱâ express-session ¼öÁ¤Çϱ⠺¸¾È °ü·Ã ¸ðµâ Ãß°¡Çϱ⠱ê, ±êÇãºê »ç¿ëÇϱ⠴õ ³ª¾Æ°¡±â : pm2¿Í ¸Þ¸ð¸® DB 8.2 Ŭ¶ó¿ìµå ¼ºñ½º 8.3 Ŭ¶ó¿ìµå È£½ºÆà ¼ºñ½º : Heroku 8.4 µµÄ¿ »ç¿ëÇϱ⠵µÄ¿¶õ? µµÄ¿ ±âº» »ç¿ë¹ý 8.5 Ŭ¶ó¿ìµå ÀÎÇÁ¶ó ¼ºñ½º : AWS EC2 AWS °èÁ¤ »ý¼º EC2 ÀνºÅϽº »ý¼º µµÄ¿¿Í ±êÇãºê¸¦ ÀÌ¿ëÇؼ EC2¿¡ ¹èÆ÷Çϱâ Á¤¸®Çغ¾½Ã´Ù ³ªÀÇ ÀÌÇصµ¸¦ ÃøÁ¤ÇÏÀÚ [ÇÔ²²ÇغÁ¿ä 8-1] package.json ÆÄÀÏ ¼öÁ¤ ¨ç (facebook-clone/package.json) [ÇÔ²²ÇغÁ¿ä 8-2] winston.js ÆÄÀÏ ¼öÁ¤ (facebook-clone/config/winston.js) [ÇÔ²²ÇغÁ¿ä 8-3] app.js ÆÄÀÏ ¼öÁ¤ ¨ç (facebook-clone/app.js) [ÇÔ²²ÇغÁ¿ä 8-4] app.js ÆÄÀÏ ¼öÁ¤ ¨è (facebook-clone/app.js) [ÇÔ²²ÇغÁ¿ä 8-5] app.js ÆÄÀÏ ¼öÁ¤ ¨é (facebook-clone/app.js) [ÇÔ²²ÇغÁ¿ä 8-6] post.js ÆÄÀÏ ¼öÁ¤ (facebook-clone/routs/posts.js) [ÇÔ²²ÇغÁ¿ä 8-7] users.js ÆÄÀÏ ¼öÁ¤ (facebook-clone/routes/users.js) [ÇÔ²²ÇغÁ¿ä 8-8] login.ejs ÆÄÀÏ ¼öÁ¤ (facebook-clone/views/users/login.ejs) [ÇÔ²²ÇغÁ¿ä 8-9] .env ÆÄÀÏ ¼öÁ¤ (facebook-clone/.env) [ÇÔ²²ÇغÁ¿ä 8-10] app.js ÆÄÀÏ ¼öÁ¤ ¨ê (facebook-clone/app.js) [ÇÔ²²ÇغÁ¿ä 8-11] package.json ÆÄÀÏ ¼öÁ¤ ¨è (facebook-clone/package.json) Âü°í ¸µÅ© Àüü ¼Ò½ºÄÚµå ¹× ¿¬½À¹®Á¦ Ç®ÀÌ ÇØ´ä ÀúÀå¼Ò ã¾Æº¸±â