Node.js + Express3 + MongoDB + mongoose + Jadeã§ãã©ã¼ã ãããã¼ã¿ãinsertãã mongooseçµç±ã§MongoDBãæä½ãã mongooseã¨ããMongoDBåãã®ORM(ORãããã¼)ãå©ç¨ãã¦ãExpressã«Modelã®æ¦å¿µãå°å ¥ãã¦ã¿ã¾ããmongooseã¨ä»ã®ã¢ã¸ã¥ã¼ã«ãçµã¿åããããã¨ã§ãModelã ãã§ãªãControllerãViewã¨é£æºããã·ã³ãã«ãªæ§æã«ãããã¨ãåºæ¥ã¾ãã mongooseã¨Expressãå©ç¨ããMVCã®ãã¥ã¼ããªã¢ã«ã§ãã ãµã³ãã«ã®ç»é¢ ä¸è¦§ç»é¢ ç»é²ããã¨ã³ã¸ãã¢ã®ä¸è¦§ã表示ããã¾ãã ç»é²ãã©ã¼ã ã¨ã³ã¸ãã¢ãç»é²ãããã©ã¼ã ã§ãã ãã©ã«ãé層 Windowsç°å¢ã« C:\Express\webengineer ã¨ããé層ãä½ã£ã¦ãããã«ã¢ããªãæ§æããã æçµçã«ã¯ç»åã®ãããªã
é£è¼ç®æ¬¡ ååã®ããã¾ããèããªãNode.jsã®åºç¤ç¥èã¨npmãGulpã®ã¤ã³ã¹ãã¼ã«ãã«ããã¦ããµã¼ãã¼ãµã¤ãJavaScriptå®è¡ç°å¢ã§ããNode.jsã«ã¤ãã¦åºæ¬çãªèª¬æãè¡ãã¾ãããã¾ãããã®å¨è¾ºãã¼ã«ã§ããnpmãGulpãå«ããç°å¢ã®ã»ããã£ã³ã°ãè¡ããNode.jsãç¨ãã¦MEANã¹ã¿ãã¯ã¢ããªéçºãã§ããç¶æ ã«ãªã£ãã¨æãã¾ãã æ¬è¨äºã§ã¯ä¸è¨ç°å¢ãç¨ãã¦èª¬æãã¦ããã®ã§ãå®éã«ãµã³ãã«ãåããããå ´åã«ã¯ååã®è¨äºãèªãã§ç°å¢ãä½æãã¦ããã¾ãããã ä»åã¯ãµã¼ãã¼å´ã®MVCãã¬ã¼ã ã¯ã¼ã¯ããExpressãã«ã¤ãã¦è§£èª¬ãã¾ãã MVCãã¬ã¼ã¯ã¼ã¯ãExpressãã¨ã¯ ãExpressãã¨ã¯ãNode.jsä¸ã§åä½ããWebã¢ããªã®ãã¬ã¼ã ã¯ã¼ã¯ã§ãã Webã¢ããªãæ§æããä¸ã§å¿ è¦ãªæ©è½ãããã£ã¦ãããã«ã¼ãã£ã³ã°ããã¥ã¼ãã«ãã¼ãã»ãã·ã§ã³ç®¡çã®æ©è½ãããã©
http://dotinstall.com/lessons/basic_expressjsã¯Express 3.xãåæã¨ãªã£ã¦ããã®ã ããExpress 4.xã§å¦ã¶å ´åã«ã¯å°ãæ°ãã¤ããªããã°ãªããªãæãããã®ã§ã以ä¸ã«ã¡ã¢ãã¦ããã ãè£è¶³ã ãã®è¨äºãæ¸ããæããæ´ã«å¤æ´ãå ãã£ã¦ãããããæ¬è¨äºã®ã³ã¡ã³ããåèã«ãã¦ä¸ããã http://dotinstall.com/lessons/basic_expressjs/26502 ä¸è¨ã¯expressã³ãã³ãã®ä½¿ãæ¹ãå¦ã¶ç« ã§ããããExpress 4.x以éã¯expressã³ãã³ãã®ã¤ã³ã¹ãã¼ã«æ¹æ³ãå¤ãã£ã¦ããã®ã§æ³¨æãå¿ è¦ã§ããã $ sudo npm install express -g æ¼ç¿ã§ã¯ä¸è¨ã®ã³ãã³ããå©ãã¦ããããExpress 4.x以éã¯ä»¥ä¸ã®ã³ãã³ããå®è¡ããå¿ è¦ããã£ãã $ sudo npm insta
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}