You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
以åï¼id:fits:20110306ï¼ã« Sinatra ã§ä½æãããµã³ãã«ã® node.js çãä½æãã¦ã¿ã¾ããã ç°å¢ã¯ä»¥ä¸ã®éãã§ãSinatra çã¨åçã®æ§æã«ãªã£ã¦ãã¾ãã node.js 0.4.0 Express 1.0.7 Haml.js 0.5.1 Mongoose 1.1.24 MongoDB 1.8.1 rc1 ãµã³ãã«ã®ã½ã¼ã¹ã¯ http://github.com/fits/try_samples/tree/master/blog/20110409/ äºåæºå ã¾ããä»å使ç¨ããããã±ã¼ã¸ã npm ã§ã¤ã³ã¹ãã¼ã«ãã¦ããã¾ãã ã¤ã³ã¹ãã¼ã«ä¾ > npm install express > npm install hamljs > npm install mongooseExpress ç¨ã® Haml ããã±ã¼ã¸ã¯ä»ã«ãããããã§ãããä»å㯠Haml.js
æã Xvfbã¨Firefoxã使ã£ã¦Webãµã¤ãã®SSãæ®ã - ç§ã®æå¸ ã¨ããè¨äºãæ¸ããããã®è¨äºããXvfbãã§æ¤ç´¢ããã¾ãã£ã¦ãã¦ãXvfbãªãã¦ä½ãç¥ããªãç§ã¯å°ã£ã¦ãã¾ãã ããä¸ã¤å°ããã¨ãããã®æ¹æ³ã ã¨Firefoxã®ãã¼ã¸ã§ã³ãä¸ããã«ã¤ãããã¦ã£ã³ãã¦é表示ãã®ããã®è¨å®ãç¡å¹åãããã¦ã£ã³ãã¦ãæ ãè¾¼ãã§ãã¾ãã¨ãããã¨ã«ã ãªã®ã§ãåºæ¥ä¸ãã£ãç»åã«ImageMagickãªã©ã§Cropãã¦ãããããªãã§ããããããã«é¢åèãã®ã§ãä»åº¦ãããPhantomJSãã¨ãããã®ã使ã£ã¦ã¿ããã¨æãã¾ãã PhantomJSã¨ããã®ã¯ãnode.jsã¨ããã®è¾ºã®ãµã¼ããµã¤ã(ã³ãã³ãã§)Javascriptãå®è¡ãããã¼ã¨ãããã¤ãªãã ãã©ãQtWebkit(ãã®Qt + Webkit)ã¨ããã¬ã³ããªã³ã°ã¨ã³ã¸ã³ãå ¥ã£ã¦ãã¦ãDOMæä½ãæ¬å½ã®Webkitãããã«ã
Node GHã¯node.js/JavaScript製ãBSD Licenseã®ãªã¼ãã³ã½ã¼ã¹ã»ã½ããã¦ã§ã¢ã§ãã ãªã¼ãã³ã½ã¼ã¹ããã使ãããã°ã©ãã¼ã§ããã°GitHubã便å©ã«ä½¿ã£ã¦ããã®ã§ã¯ãªãã§ããããããããªæ¹ã«ãå§ããããã®ãNode GHã§ããGitHubã®APIã使ã£ã¦ãã便å©ãªã³ãã³ããæä¾ãã¦ãããã½ããã¦ã§ã¢ã§ãã ã¤ã³ã¹ãã¼ã«ãã¾ããnpmã使ã£ã¦ã§ããã®ã§ç°¡åã§ãã æåã«èªè¨¼ãæ±ãããã¾ããIDã¨ãã¹ã¯ã¼ããå ¥åãã¾ãã GitHubã®ãªãã¸ããªã«ç§»åãã¦æä½ãã¾ããisã³ãã³ãã¯èª²é¡ããªã¹ãã¢ããããæ©è½ã§ãã isã®å¾ã«æåãã¤ãããã¨ã§æ°ãã課é¡ãç»é²ã§ãã¾ãã ããã¦èª²é¡ãä¸è¦§ã§ç¢ºèªãã¾ãããã®æã®çªå·ãã³ã¡ã³ãã®æã«ä½¿ãã¾ãã ããã«ãã®èª²é¡çªå·ã«å¯¾ãã¦--commentãä»ããã°ã³ã¡ã³ããã§ãã¾ãã ntã§ã¢ã¯ãã£ããã£ãåãã¾ãã ãã®ä»ãNode
æ¬æ¸ã«ã¤ã㦠æ¬æ¸ã¯ãNode.jsã§ã®ã¢ããªã±ã¼ã·ã§ã³éçºãå§ãããã¨ããçããã«ã âé«åº¦ãªâJavaScriptã«ã¤ãã¦ç¥ãã¹ããããããã¨ã解説ãã¾ãã ããããâHello Worldâãã¥ã¼ããªã¢ã«ã®ãã¯ããä¸ããããã®ã§ãã ã¹ãã¼ã¿ã¹ è²´æ¹ãèªãã§ããã®ã¯ãæ¬æ¸ã®ããããæçµçã¨ãªãã¾ãã ã¤ã¾ãæ¬æ¸ã¯ãééããè¦ã¤ãã£ãå ´åãã Node.jsã®æ°ãã¼ã¸ã§ã³ã«ãããå¤æ´ç¹ãåæ ããæã®ã¿ãæ¹è¨ããã¾ãã æçµæ´æ°æ¥ã¯2012å¹´2æ12æ¥ã§ãã æ¬æ¸å ã®ã³ã¼ãã®ãµã³ãã«ã¯ãNode.jsã®ãã¼ã¸ã§ã³0.6.10ã§ãã¹ããã¦ãã¾ãã ã¿ã¼ã²ããèªè æ¬æ¸ã¯ãRubyãPythonãPHPãJavaã®ãããªãå°ãªãã¨ãã²ã¨ã¤ã®ãªãã¸ã§ã¯ãæåè¨èªãç解ãã¦ããã JavaScriptã«ã¤ãã¦ã¯ãã¾ãçµé¨ããªããNode.jsã«ã¤ãã¦ã¯å ¨ãçµé¨ããªãã¨ããã èè ã¨åããããªãã
æ´¾æã§è¦æ ãããã大è¦æ¨¡ãªãããã¯ããä½ããï¼ã£ã¦ãããã¨ã§ãä¸äººã§ãã«ã¹ã¿ãã¯ãªããã²ãä½ã£ã¦ããã大ããªããã°ã©ã ãæ¸ãã¦ãç ´ç¶»ããªãããã«ãã¹ãæ¸ãã¾ãã£ã¦ãã¹ããã¡ã¼ã¹ããå¿ãããããTravis-CIã«ããç¶ç¶çã¤ã³ãã°ã¬ã¼ã·ã§ã³ã§é å¼µã£ããã ã¨ããããã§ä½ã£ã¦ããã®ã¯MMORPGãªãã ãã©ãããã§å®è£ ããã®ã¯ã¾ãå¹³åçãªMMORPGãæ³åãã¦ããããããèªåããããã¨ãã¦ããã®ã¯ãã¢ãã³ãªOSSã¨ãããã®å®ãVPSã§ãç¬å¦ã®å¦çä¸äººã§ããã«ã¹ã¿ãã¯ãªããã²ã¿ãããªã®ãçµãããã¨ãããã¨ã®å®è¨¼ã ãªãã§ãããªãã¨ããã¦ãããã£ã¦è¨ãã¨ãä¸å¿å°±æ´»ä¸ã§ãè¦æ ããããã¢ããªæåºã§ããã¨ãããããªã¼ã£ã¦ããä¸å¿ã *追è¨* ããã§ã¯ https://github.com/mizchi/wanderer ã®ãã¨ãè¨ã£ã¦ããã ãã©å¤§è¦æ¨¡ãªãã¡ã¯ã¿ãªã³ã°ä¸ãªã®ã§ããã§è¨ã£ã¦ããã¨ã¯ååããã
ããä¸ã¶æãããããJavaScriptã注ç®ããã¦ããããã ãçç±ã¯ç°¡åã§ãGoogleã®JavaScriptã¨ã³ã¸ã³ã使ã£ãã¢ããªã±ã¼ã·ã§ã³ã»ãµã¼ãã¼ã§ããnode.jsã®æ§è½ãé«ãã¨ä¸»å¼µããã¦ããããã ã å°å³ã«ãã¼ã ã«ãªãã¤ã¤ãããAjaxã®ããã«ã¦ã§ãéçºã®ç¾å ´ã«å®çããããç¥ããªããå¤æ°ã®ããã°ã§ç´¹ä»ãããã¦ãããç¾ç¶ã®ãã®ç¹å¾´ãæ¯ãè¿ãã¤ã¤ãnode.jsãæ®åããããèå¯ãã¦ã¿ãã 1. JavaScriptã¯ããã©ã¦ã¶çºã®äººæ°ã¹ã¯ãªããè¨èª JavaScriptã¯ãLiveScriptã¨ãã¦1995å¹´ã«Netscape Navigatorã¨ããã¦ã§ãã»ãã©ã¦ã¶ã«æè¼ãããã®ãå§ã¾ãã§ãããã«æ¿æ²»çãªçç±ã§JavaScriptã«æ¹åãããã1996å¹´ã«ã¯ããã®åºæ¬çãªææ³ãECMAScriptã¨ãã¦ãECMA-262ã¨ISO/IEC 16262ã§å®ç¾©ããã¦ãããè¨èªä»æ§ãç°¡
Node.jsã§Webã¢ããªãæ¸ãã¦ããã ãã©å¥ã«å¤§éã®ãªã¯ã¨ã¹ãããã°ãããã§ããªããWebSocketã使ã£ã¦ãªãããããããªãã§ãããªãã¨ãã¦ãã®ãã¨ãã話ã ã¾ãçµè«ã ãæ¸ãã¨ã 並å度ãä½ãã¦ãããé·æéããããã¨ã確å®çãªå¦çãéåæçã«èµ°ãããå¿ è¦ãããå ´åãæ®éã¯ãã®ãããªç¨éã§ãJobQueue/Workerã使ã£ã¦æ§æãããããããã®ã¯ç®¡çãé¢åã ãã¤ã³ã¹ãã¼ã«ãé¢åããããªãã®ã§ããã¾ããããããªããNode.jsãªãæ®éã®Webã¢ããªã±ã¼ã·ã§ã³ãã¬ã¼ã ã¯ã¼ã¯ã ãã§ã©ã¯ã«æ¸ãã¦ããããããï¼ ã¨ããã²ã¨ã¤ã®ææ¡ã§ãã åæå®è¡ã®ã±ã¼ã¹ æ®éWebã¢ããªã±ã¼ã·ã§ã³ãã¬ã¼ã ã¯ã¼ã¯ã¨ããã®ã¯ãä¸é£ã®å¦çã¯ã¯ã©ã¤ã¢ã³ãã«ã¬ã¹ãã³ã¹ãè¿ããã¨ã§å®äºãããããã¦ã²ã¨ã¤ã®ããã»ã¹/ã¹ã¬ããã¯ãªã¯ã¨ã¹ãããã£ã¹ãããããã¦ããã¬ã¹ãã³ã¹ãè¿ãã¾ã§ããã®ãªã¯ã¨ã¹ãã«å æãããã ããã§
ãç¥ãã
é害
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}