Denoã¨Node.jsã¯ä¸¡æ¹ã¨ãV8ãããã¯ã¨ã³ãã«ãããµã¼ãã¼ãµã¤ãJavaScriptã©ã³ã¿ã¤ã ã ããããã«ã¯å¤§ããªéããåå¨ããkeroxp.icon
Denoã¨Node.jsã¯ä¸¡æ¹ã¨ãV8ãããã¯ã¨ã³ãã«ãããµã¼ãã¼ãµã¤ãJavaScriptã©ã³ã¿ã¤ã ã ããããã«ã¯å¤§ããªéããåå¨ããkeroxp.icon
Dockerizing a Node.js web app The goal of this example is to show you how to get a Node.js application into a Docker container. The guide is intended for development, and not for a production deployment. The guide also assumes you have a working Docker installation and a basic understanding of how a Node.js application is structured. In the first part of this guide we will create a simple web appl
ã¯ããã«#åã以åæ¸ããModern JavaScript æ¦è¦³ããã㦠Electron ã¸ã¯ãèªãã§è²°ããã ãããï¼ ããã¯åå¦è ã«ã¯å ¨ãåãã¦ãªãã¨ã³ããªã ã ãã®ã¨ã³ããªã¯ãåã®ç解ããã¢ãã³ãª JavaScript å ¨ä½ã«ã¤ãã¦æ¦è¦³ãããã¨ãç®çã¨ãã¦ãããããã ãããèªãã§ããä»ã® JavaScript ã£ã¦ãããªã«å¤§å¤ãªã®ãâ¦ãã¨æãã人ã¯å¤ãã ããã ããããããç¨åº¦ã®ã½ããã¦ã§ã¢ãéçºããããã«æè¡å ¨è¬ãæ¦è¦³ãããã¨ããã°ãããããåéã«ãªãã®ã¯è´ãæ¹ãªãã ã¨è¨ã訳ã§ãä»åã¯ã¡ããã¨åå¿è åãã®ã¨ã³ããªãæ¸ããã å°ãå¤ãæãããããããªãããä¸å¯§ã«èª¬æãããã¨ããããã ã¨å¥½æçã«è§£éãã¦æ¬²ããã éçºç°å¢#Thinkpad X1 Carbon 2016 å¹´ã¢ãã«ã« Windows10 ãã¤ã³ã¹ãã¼ã«ãã¦ããã ãã¼ãã¦ã§ã¢ã¹ããã¯ã¯ãããã ã CPU i7 6600
é²åãã¾ããã®jsã¹ã¿ãã¯ã俯ç°ã§ããè¯ããã¹ã JavaScript Stack from Scratch (https://github.com/verekia/js-stack-from-scratch )ãã3æ6æ¥ã«v2ã«ã v1㯠@takahashim ããã翻訳ããã¦ã¦( http://qiita.com/takahashim/items/7838334d1451fb0a9811 )ãç´ æ´ãããã®ã§ãããã¨ããããv2ã¯ã¾ã ãªã®ã§è±æèªã¿ãªããã¡ã¢ãããã¾ã§ã¡ã¢ãªã®ã§è©³ããã¯ãªãªã¸ãã«ããã¹ãè¦ã¦ãã ããã èªã¿ã¤ã¤å¾ã ã«è¿½è¨ãã¦ã¾ãã https://github.com/verekia/js-stack-from-scratch 01 - Node, Yarn, and package.json https://github.com/verekia/js-stack-f
index.md expresså®è·µå ¥é èªå·±ç´¹ä» å°å·å mitsuruog ããã³ãã¨ã³ãã¨ã³ã¸ã㢠Javascript, HTML, CSS, Node.js, APIè¨è¨ã¨ãèªè¨¼ã¨ã 2015/5æå ¥ç¤¾(ç´åå¹´) ã¯ããã« ããã¾ã§ã俺ãèããæå¼·ã®expresså®è·µå ¥éãã§ãã åå¦è ãexpressãæ»ç¥ããä¸ã§ã®ã¤ã¾ã¥ããã¤ã³ãã¨ãä¸è¦æ¨¡éçºãã¿ã¼ã²ããã«ãããã¹ããã©ã¯ãã£ã¹ãçµé¨ãã¼ã¹ã§ã話ãã¾ãã ãããããåãä¸ç´è åãã®å 容ã§ãã æ¬ã³ã³ãã³ãã®ä½¿ãæ¹ expressåå¿è åå¦è åããã¥ã¼ããªã¢ã«(dotinstallã¨ã)ã®ãã¨ã« expressçµé¨è ãèªèº«ã®ã³ã¼ãã®è¦ç´ãã« ä»ã®è¨èªã®çµé¨è ä»ã®è¨èªã®ããããã¯ãnode.jsã§ã¯ããããã®ãããã³ã°ã« (â»)ä¸ã§ç´¹ä»ããã³ã¼ãã¯æç²ãããã®ã§ããããã®ã¾ã¾ã§ã¯åä½ããªãå ´åãããã¾ããã注æãã ããã
(訳注ï¼2015/8/4ãããã ãã翻訳ãã£ã¼ãããã¯ãå ã«è¨äºãä¿®æ£ãããã¾ããã) Nodeã®âã¤ãã³ãã«ã¼ãâã¯é«ã¹ã«ã¼ãããã®ã·ããªãªãæä½ããä¸æ¢ã§ãã¦ãã³ã¼ã³ãè¹ã§æºã¡ããµãã¦ãããããªé åçãªå ´æã§ããããã¦ãã®ã¤ãã³ãã«ã¼ãã®ãããããã¯ã°ã©ã¦ã³ãã§ä»»æã®å¦çã®å®è¡ãå¯è½ã§ãããªãããNodeã¯æ¬è³ªçã«âã·ã³ã°ã«ã¹ã¬ããâã«ãªãã®ã§ãããã®è¨äºã§ã¯ãã¤ãã³ãã«ã¼ããã©ã®ãããªå¦çãè¡ãã®ãã説æãã¦ããã¾ããããããã°çãããããã®éæ³ã使ãããªããããã«ãªãã§ãããã ã¤ãã³ãé§ååããã°ã©ãã³ã° ã¤ãã³ãã«ã¼ããç解ããããã«ã¾ãå¿ è¦ãªã®ã¯ãã¤ãã³ãé§ååããã°ã©ãã³ã°ã®ãã©ãã¤ã ãç解ãããã¨ã§ããã¤ãã³ãé§ååããã°ã©ãã³ã°ã¯ã1960年代ããåºãç¥ããã¦ãã¾ãããç¾å¨ã¯ä¸»ã«UIã®ã¢ããªã±ã¼ã·ã§ã³ã«ä½¿ç¨ããã¦ãã¾ããJavaScriptã§ã¯ä¸»ã«DOMã¨ã®ããã¨ãã§å©
##ãã®è¨äºã«ã¤ã㦠Node.js + Express4 + MongoDB + Vagrant(éçºç°å¢) + foreverãå©ç¨ãã¦ç°¡åãªCRUD(Create, Read, Update, Delete)ã¢ããªãéçºãã¾ãããéçºã«ãããPHPæ´ï¼å¹´ã®èè ãå¾ãããç¥è¦ãã¾ã¨ãã¾ãã å°å ¥ç·¨ãç°å¢ç·¨ãéçºç·¨ã®å ¨ï¼åãäºå®ãã¦ãã¾ããçæ§ã®ããããã®éçºã®ä¸å©ã«ãªãã°å¹¸ãã§ãã ##対象èªè ããç¨åº¦ã®éçºçµé¨ããããNode.jsã使ã£ãã¢ããªã±ã¼ã·ã§ã³éçºã«èå³ããã/ããããå®è£ ãã人ã ãã³ããããã³ã°I/Oãç¥ããã人ã node.js + express4 + MongoDB ã«ããéçºç°å¢æ§ç¯ã«ä¸å®ããã人ã å°ãããã°ãã³ã°ãæ¸ãã¦ITæ¥çã«èå³ãããããããããã£ã¨å¦ãã§ããããã¨ããæ欲çãªäººã ##注ææ¸ã Node.js, MongoDB, Vagrantãª
æè¿ãæ°ããããã¸ã§ã¯ãããããã¨æã度ã«ä½¿ãè¨èªã§æ©ãã§ãã¾ãã好ããªã®ã¯Rubyã¾ãã¯nodeãªã®ã§ããããã³ãã¬ã¼ãã¨ã³ã¸ã³ãWebãã©ã¦ã¶ã§ä½¿ãè¨èªãçµ±ä¸ãããã¨æãã¨nodeãæé©ã«æãã¾ãã ããããããªä¸ãRubyã§ããµã¼ããµã¤ãã¨ã¯ã©ã¤ã¢ã³ããµã¤ããçµ±ä¸ã§ãããã¬ã¼ã ã¯ã¼ã¯ãåºã¦ãã¾ããããããVoltã§ãã Voltã®ä½¿ãæ¹ Voltã¯Opalã使ããã¨ã§ã¯ã©ã¤ã¢ã³ãã¨ãµã¼ãã®ã³ã¼ããä¸ç·ã«æ¸ããã¨ãã§ãã¾ãã以ä¸ã¯ãã¢ã®Todoã¢ããªã ãµã¼ããµã¤ãã«é·ç§»ãããã¨ãªãæç»ãæ´æ°ããã¾ããWebSocketã使ã£ã¦ãã¾ãã äºç»é¢ã«ããå ´åã«ãåæã«åæ ããã¾ãã Voltã¯Herokuã«ãããã¤ãããã¨ãã§ãã¾ããYouTubeã®åç»ãè¦ãã¨åããã¾ãããã¾ãã§éæ³ã®ããã«ãµã¼ãåãã«æ¸ããRubyã®ã³ã¼ãããã®ã¾ã¾ä½¿ãããã¨ããµã¼ãã¨ã¯ã©ã¤ã¢ã³ãã®åºå¥ããªãã©ãã©ãé
ã¿ãªããã¯æ®æ®µNode.jsãã©ã®ããã«ä½¿ã£ã¦ãã¾ããï¼Â ãµã¼ãã¼ãµã¤ãã§åãJavaScriptã§ããNode.jsã¯ãSocket.IOã¨é£æºãã¦ãªã¢ã«ã¿ã¤ã ãªã¦ã§ãã³ã³ãã³ããä½ã£ãããwebpackãgulpã®ãããªããã³ãã¨ã³ãã¨ã³ã¸ãã¢ã®ãã¼ã«ã¨ãã¦ä½¿ããããã¨ãã¾ãã¾ãªå ´é¢ã§æ´»ç¨ããã¦ãã¾ãã Node.jsã§å¤§è¦æ¨¡ãªéçºãããå ´åãTypeScriptãæ¡ç¨ãã¦éçºã®çç£å¹çæ§ã»ä¿å®æ§ãä¸ããã®ããªã¹ã¹ã¡ã§ããWebStormãVisual Studio Codeã使ãã°ã³ã¼ãè£å®ãå¹ãããããã°ã©ãã³ã°ã®å¹çãåçã«åä¸ããTypeScriptã®éçåä»ãã«ãã£ã¦ã³ã³ãã¤ã«æåãã§ãã¯ãè¡ãããã®ã§å®å ¨æ§ãå¢ãã¾ããNode.jsã使ã£ã¦ä¸ã»å¤§è¦æ¨¡ãªã·ã¹ãã ãæ§ç¯ããã¨ãã¯TypeScriptãæ¤è¨ããã¨ããã§ãããã ä»åã¯Node.jsãTypeScriptã§è¨è¿°ãã
Gruntã使ã£ã¦ã人ã«ãgulpã£ã¦ã©ããªã®ï¼ãã¨èãããæ©ä¼ãæè¿ä½åããã£ãã®ã§ããã¾ãããªããèªåã®ææã交ãã¦çãã¦ã¿ãã ã¾ããèªåãããããããã¸ã§ã¯ããå§ããã¨ãããgulpã使ãã§ããããçç±ã¯è³ªåã«çããªããæ¸ãã¦ããã¾ãã Grunt使ãç¶ãã¡ãã ããªã®ï¼ ããã§ãããããªããGruntã«ååæ £ãã¦ãã¦ãã¿ã¹ã¯ã®ãã³ãã¬ã¼ãããã£ã¦ããã«éçºã«å ¥ãããªãGruntã使ãç¶ãã¦ãããã¨æãã¾ãããã ãä»ã¯Gruntã¨gulp両æ¹ã¨ã使ããã¦ãã¾ãããã©ã£ã¡ãè¦æ¨©ãæ¡ãããããã¾ãããGruntããç¥ããªãã¾ã¾gulpã®æ代ãæ¥ãã¨ãã«ãã¦ãã¦ã®å·®ãå¤å°åºãããããã¾ããã ããããªããGruntãçæéç¨åº¦ã«ä½¿ã£ã¦ãã¦ãè¨å®ãã¦ãã¿ã¹ã¯ãããã¼ã«ã«ãµã¼ãã¨ã©ã¤ããªãã¼ãããã¨minifyç³»ãããããªäººãªãgulpã触ã£ã¦ã¿ã価å¤ã¯ããã¨æãã¾ããåãã¿ã¹ã¯ãgulpã§ã
1 pixelï½ãµã¤ãã¼ã¨ã¼ã¸ã§ã³ãå ¬å¼ã¯ãªã¨ã¤ã¿ã¼ãºããã° ãµã¤ãã¼ã¨ã¼ã¸ã§ã³ãã®ã¯ãªã¨ã¤ã¿ã¼ã®åãçµã¿ãç´¹ä»ãããªãã£ã·ã£ã«ããã°ã§ããææ°æè¡ã¸ã®ææ¦ããµã¼ãã¹èªçã®è£è©±ãåå¼·ä¼ãã¤ãã³ãã®ã¬ãã¼ããªã©CAã¯ãªã¨ã¤ã¿ã¼ã®æ å ±ãæºè¼ã§ãã ããã«ã¡ã¯ãAmebaäºæ¥æ¬é¨ã®ææ¬ã¨ç³ãã¾ãã æ¥åã§ã¯ã天ä¸çµ±ä¸ã¯ããã¯ã«ãã¨ãããã¼ã ã§ããã³ãã¨ã³ãã®ãã£ããããããã¦ãã¾ãã ä»åã¯ããnode-webkitãã¨ããä¸é¢¨å¤ãã£ãã¢ããªã±ã¼ã·ã§ã³ãç´¹ä»ããã¦ããã ãã¾ãã ç§éã¯æ®æ®µãgruntã¨ãã£ãnode.js製ã®ãã¼ã«ã使ã£ã¦JavaScriptã®çµåãå§ç¸®ãç»åã®æ¸è²ã¨ãã£ãå¦çãèªååãã¦ãã¾ãããnode-webkitã¯ãããnodeã®ã¢ã¸ã¥ã¼ã«ã使ã£ã¦GUIã¢ããªã±ã¼ã·ã§ã³ãä½ãããã¼ã«ã§ããnodeã®è³ç£ããã®ã¾ã¾å©ç¨ã§ããã®ã§ãç§ã®ãããªãã£ããããã«ã¯å¬ããã§ããã
ãã¾ãã«ãä¸æ ã«ãã¨ãã®ã§ä½ã£ãã NHKã®RSSãå®æçã«ãã§ãã¯ãã¦ãæ°çãã¥ã¼ã¹ã®åç»ãé£ç¶èªååçããã ã¨ã¦ããã¬ãã£ã½ãããããã§4æ¥å¾ã«ãªãªã³ããã¯ãéå¬ãããã¨ããäºãç¥ããã ã½ã¼ã¹ã³ã¼ã https://github.com/shokai/nhk-news-app zipã§ãã¦ã³ãã¼ã https://github.com/shokai/nhk-news-app/releases node-webkitã¯ãã¤ãã£ãã¢ããªä½æã®ããã«webkitãæ¹é ãããwebãã©ã¦ã¶ã§ãHTML/JavaScript/CSSãå®è¡ã§ããã ãã§ãªãnode.jsã®APIããã®ã¾ã¾å¼ã³åºããã ã¤ã¾ãjQueryã§DOMæä½ããã¨åæã«nodeã®ã©ã¤ãã©ãªã使ããããªå¦çããåãããã°ã©ã ãã¡ã¤ã«ã«ã¾ã¨ãã¦æ¸ãããå¤ã«ããªãã¸ãæ¸ãäºãªããã¤ãã®nodeã®ããã« require(âã¢ã¸ã¥
åºæ¬æä½éå¼ããªãã¡ã¬ã³ã¹ï¼CoffeeScriptï¼ Node.jsã¨ãç¾å¨ä½¿ããã¦ããã»ã¨ãã©ã®ãã©ã¦ã¶ã§å ±éãã¦ä½¿ããã¡ã½ãããææ³ããç¨éãã¨ã«ã¾ã¨ãã¦ç´¹ä»ãã¾ãã æåå æååãä½ã æååã¯" "ã¾ãã¯' 'ã§å²ãã¾ãã" "ã®ä¸ã§"ã使ã£ããã' 'ã®ä¸ã§'ã使ãã«ã¯ã\ã§ã¨ã¹ã±ã¼ããã¾ãã "abc" 'abc' # 以ä¸2ã¤ã¯ã©ã¡ãã®æ¸ãæ¹ã§ãåãæå³ "I can't say \"no.\"" 'I can\'t say "no."' æååã«å¼ãåãè¾¼ã " "å ã§ã¯#{ }ã使ã£ã¦ãå¼ãå¤æ°ã®å¤ãåãè¾¼ããã¨ãã§ãã¾ãã "1 + 1 = #{1 + 1}" # => '1 + 1 = 2' æåæ°ãåå¾ãã æåå.lengthã¯ãæååã®æåæ°ãè¿ãã¾ãã "abcããã¯".length # => 6 æååãæ°å¤ã«å¤æãã parseInt(æåå, 10)
Webå¶ä½ã§é¢åãªä½æ¥ãèªååãããã«ããã¼ã«ãGrunt v0.4 å ¥é 2013-03-14 / 2014-03-12 Webãµã¤ãã®è¡¨ç¤ºé度ãæ°ã«ããã¨ãCSSãJavaScriptã®minifyãgzipãCSS Spriteãç»åã®æé©åãªã©ã®é¢åãªä½æ¥ãçºçãã¾ãã Grunt.jsã¨ã¯ï¼ Grunt.jsã¯ããµã¼ãã¼ãµã¤ãJavaScriptã®Node.jsã使ç¨ããCUIã®ãã«ããã¼ã«ã§ãã ã¿ã¹ã¯ãè¨å®ãã¦ãããããããèªååãã¾ãã ã³ãã³ãããã³ãããã¿ã¼ããã«ãªã©ããããããé»ãç»é¢ãã使ãã¾ãã Grunt.jsã®ç¾å¨ã®ãã¼ã¸ã§ã³ã¯0.4.1ã§ãã ãã¼ã¸ã§ã³ã0.3ãã0.4ã«ãªã£ããã¨ã§ã大ããä»æ§ãå¤ããã¾ããã Grunt.js v0.4ã§ã¯grunt-cliãã¤ã³ã¹ãã¼ã«ãã¦ããã¸ã§ã¯ããã¨ã«Gruntããã©ã°ã¤ã³ãã¤ã³ã¹ãã¼ã«ãã¦ä½¿ç¨ãã¾ãã ãã©ã°ã¤
æ®éã® JavaScript ã jQuery ãã¾ã¨ãã«æ¸ããªããã©ãã¯ããã¦ã® Web ã¢ããªã Node.js ã§ã¤ãã£ã¦ã¿ãã¨ãã奮éè¨ã ç°å¢ã¤ããã ããªã®ã«ä½ãåãããªããã¦ãããããã¦ããã®ä¸é£ã®æµãã ãã§ä¸¸ 2 æ¥æ½°ããã¨ãã大æ¨äºã ã£ãã®ã§ãã¡ããã¨ããã°ã«æ®ãã¦ããã Node.js ã®ã¤ã³ã¹ãã¼ã« Node.js ã® INSTALL ãã¿ã³ãããã¤ã³ã¹ãã¼ã©ã使ã£ã¦å ¥ãããã¨ãã§ãããã©ãNode.js ã®ãã¼ã¸ã§ã³ãåãæ¿ãã¦ä½¿ããæ¹ã便å©ã ã¨æãã®ã§ãååã®ã¨ã³ããªãåèã« nodebrew ã使ã£ã¦ã¤ã³ã¹ãã¼ã«ããã®ããªã¹ã¹ã¡ã node.js å ¥ãããªã nodebrew ãè¶ ç°¡å - tacamy memo ã¤ã³ã¹ãã¼ã«ãæ£ããã§ãã¦ããã確èªã®ãããNode.js ã®ãã¼ã¸ã§ã³ã表示ã $ node -v npm ã®ã¤ã³ã¹ãã¼ã« Node.js ã«ã¯ããã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}