node.jsã§UDPãµã¼ãã¼ãä½ã£ãã®ã§ããããããé©å½ãªãµã¼ãã¼ä¸ã§éç¨ããã¦ã¿ããã¨æã£ãã¨ãããã©ããã£ãå½¢ã§éç¨ããã°ããã®ãããããªãâ¦ãéçºæã«ã¯nodeã³ãã³ãã使ã£ã¦ãµã¼ãã¼ãç«ã¡ä¸ãã¦ãã¾ããããæ¬çªãµã¼ãã¼ã§ãããã§ããã®ã?調ã¹ã¦ããã¨ãããforeverã¨ããnode.jsç¨ã®ãã¼ã¢ã³ããã¼ã¸ã£ã¼ããããããã使ãã®ã楽ããã ã£ãã®ã§ä½¿ã£ã¦ã¿ã¾ããã foreverã®ã¤ã³ã¹ãã¼ã« foreverã¯npmã使ã£ã¦ã¤ã³ã¹ãã¼ã«ãããã¨ãã§ãã¾ããforeverã¯ã³ãã³ãã©ã¤ã³ä¸ã§ä½¿ãã®ã§ãnpm 1.0ç³»ã§ã¯-gãªãã·ã§ã³ãã¤ãã¦ã°ãã¼ãã«ã¤ã³ã¹ãã¼ã«ããå¿ è¦ãããã¾ãã sudo npm install forever -g ã¢ããªã±ã¼ã·ã§ã³ã®èµ·å ã¢ããªã±ã¼ã·ã§ã³ã®ç®¡çã«ã¯foreverã³ãã³ãã使ãã¾ãã forever start udpserver/udps
daemon.nodeã使ç¨ãã¦expressã§ä½æããhttpãµã¼ãã¼ãdaemonåããæ¹æ³ãæ¸ãã¾ãã daemon.nodeï¼https://github.com/indexzero/daemon.nodeï¼ã使ç¨ãã¦expressã§ä½æãããµã¼ãã¼ãdaemonåã§ããããã«ãã¾ããdaemon.nodeèªä½ã¯npm install daemonã§ã¤ã³ã¹ãã¼ã«ãã¦ããã¾ããvar sys = require('sys'), fs = require('fs'), http = require('http'), path = require('path'), daemon = require('daemon'); var lockfile = path.join(__dirname, 'pids/daemon1.pid'); var logfile = path.join(__di
ï¼â»æ³¨ï¼2012å¹´å½æã®è¨äºã®ããå 容ã¯ããªãå¤ãã§ãããã¤ãæ¸ãç´ãããã»ã»ã»ï¼ 2012å¹´ãã¹ã¿ã¼ããã¦æ©5æ¥ã ãã£ããã®å¿æ©ä¸è»¢ã®ãã£ã³ã¹ã ããä½ãæ°ããæè¡ãè¦ãã¦ã¿ããã¨æããWebSocket ã®åå¼·ããã¦ã¿ããã¨ã«ãã¾ããã æ¢ã«ãåç¥ã®æ¹ãå¤ãã¨æãã¾ãããWebSocket ã¨ã¯ãã©ã¦ã¶ä¸ã§ Web ãµã¼ãã¨ã®åæ¹åéä¿¡ãå¯è½ã«ããè¦æ ¼ã®ãã¨ã§ã HTML5 ã¨ã¨ãã«ãWeb ã¢ããªã±ã¼ã·ã§ã³ãããããå ¨çæãè¿ããã ããæ代ã«ãã£ã¦ã¯å¿ é ã¨ãè¨ãããã®ã§ãã blog.livedoor.jp ãã©ã¦ã¶ä¸ã§åæ¹åéä¿¡ãè¡ãããã®è¦æ ¼ã¨ãã¦ã¯ãããã¾ã§ã«ã Ajax ã Comet ã¨ãã£ããã®ãããã¾ãããã ãµã¼ãããã®ããã·ã¥éä¿¡ãã§ããªããã¨ãè² è·ãé«ãã¨ãã£ãåé¡ãããã ããããç°¡æ½ãªå®è£ ã§è§£æ¶ã§ããæè¡ãæ±ãããã¦ããããã§ãã â»Ajax, Comet,
ä»é¢¨ã®node.jsç°å¢ã®ä½ãæ¹ã§ããnaveã«ãã£ã¦è¤æ°ãã¼ã¸ã§ã³ã®node.jsãå ±åããã¾ãã ã¾ãnpmã以åã¨ã¯å°ã使ãæ¹ãå¤ãã£ã¦ãã®ã§ããã®ä½¿ãæ¹ããã©ãã¼ãã¦ãã¾ãã ç°¡åãªç¨èªèª¬æ: node.js: ã¤ãã³ãé§åã¢ã¼ããã¯ãã£ãªãµã¼ããµã¤ãJavaScriptç°å¢ nave: è¤æ°node.jsãã¼ã¸ã§ã³ã管çããã·ã¹ãã npm: node.jsç¨ããã±ã¼ã¸ã·ã¹ãã ãããã naveãã¦ã³ãã¼ã naveããnodejsã¤ã³ã¹ãã¼ã« ã¤ã³ã¹ãã¼ã«ããnodejsã«npmã¤ã³ã¹ãã¼ã« npmã§ã°ãã¼ãã«ã¢ã¸ã¥ã¼ã«ã¤ã³ã¹ãã¼ã« 確èªããç°å¢ ubuntu natty cygwin on Window7 x64 å¿ è¦ãªãã® äºåã«å¿ è¦ãªãã®ã¯ããããããããã±ã¼ã¸ãããã¦ããã¾ã: naveãnpmã§å¿ è¦ãªç© bashãgitãcurl nodejsãã«ãã«å¿ è¦ãªç© ub
ãã®ã¨ã³ããªã®è¨è¿°ã¯æ¢ã«å¤ãã§ããææ°ã®ã¤ã³ã¹ãã¼ã«æ¹æ³ã¯ä¸è¨ã®ã¨ã³ããªãåç §ãã¦ãã ããã http://d.hatena.ne.jp/t_43z/20110503/1304421488 ãã®ã¨ã³ããªã¯ãªã¢ã«ã¿ã¤ã Webããã«ã½ã³ã®ãã³ãºãªã³è³æãã®1ã§ãã Linux æ®éã«å ¥ãã å¾è¿°ã®naveã使ãæ¹ãããã¨æããã£ã¦ãããnpmã®ã¤ã³ã¹ãã¼ã«æ¹æ³ãã©ãããããã«ãã£ã¦node.jsæ¬ä½ã®ã¤ã³ã¹ãã¼ã«æ¹æ³ãå¤ããããªã®ã§(naveã使ããªãã«ãã¦ã)æå¾ã¾ã§èªãã§ãããããã¨ãæ¨å¥¨ã æ®éã«ããã¨ãããªæãã $ sudo apt-get install build-essential libssl-dev curl $ mkdir tmp $ cd tmp $ wget http://nodejs.org/dist/node-v0.2.3.tar.gz $ tar -xvzf n
ãã®ã¨ã³ããªã¯ãªã¢ã«ã¿ã¤ã Webããã«ã½ã³ã®ãã³ãºãªã³è³æãã®2ã§ãã ååã®è¨äºã§node.jsã¨npmã®ã¤ã³ã¹ãã¼ã«ã¯å®äºãã¦ãããã®ã¨ãã¾ãã ã¾ãã¯å¿ è¦ãªã©ã¤ãã©ãªã®ã¤ã³ã¹ãã¼ã« $ npm install express jade less socket.io npm info it worked if it ends with ok npm info using npm@0.2.3-6 npm info fetch http://registry.npmjs.org/express/-/[email protected] npm info fetch http://registry.npmjs.org/less/-/less-1.0.36.tgz npm info fetch http://registry.npmjs.org/socket.io/-/socket.io-
ãã®ã¨ã³ããªã¯ãªã¢ã«ã¿ã¤ã Webããã«ã½ã³ã®ãã³ãºãªã³è³æãã®3ã§ãã ååã®ç¶ãã§ããã¾ãã¯Socket.ioã使ããããã«ãã¾ãããã app.jsã®å é ã var express = require('express'); ãã var express = require('express'), io = require('socket.io'); ã«ããã ã¾ãããã¡ã¤ã«ã®æå¾ã« var socket = io.listen(app); socket.on('connection', function(client) { // connect client.on('message', function(message) { // message }); client.on('disconnect', function() { // disconnect }); }); ã追å ããã
è¿½è¨ 11/7/31 Socket.IO v0.7 解説ãæåã«éä¸ã¾ã§ã§åºãã 11/8/1 ã ãããå ¨é¨æ°æ©è½ãªã®ã§ '(æ°æ©è½)' ã£ã¦æ¸ãã®ãããã 11/8/4 ãªãã·ã§ã³ã®è¨å®å¨ããè¿½è¨ 11/8/6 èªè¨¼å¨ããè¿½è¨ 11/8/12 ã¹ã¿ã³ãã¢ãã¼ã³ã®ãµã³ãã«ãè¿½è¨ 11/9/27 Socket.IO v0.8 対å¿ã«ã¤ãã¦è¿½è¨ 11/9/27 ã¿ã¤ãã«ã Socket.IO API 解説ã«å¤æ´ 11/9/27 翻訳ãµã¤ããªã³ã¯è¿½å å ¬å¼ããã¥ã¢ã«ç¿»è¨³ãµã¤ã ããããã°å ¬å¼ãµã¤ãã®ç¿»è¨³ããã©ã¼ã¯ãããªãã¸ããªã§ããããªãã®æ´æ°é »åº¦ã§ãã£ã¦ã¾ãã ãªãã¸ããªã® wiki ãå°å³ã«è¨³ãã¦ã¦ãã£ã¡ã¯çµæ§å½¹ã«ç«ã¡ã¾ããæ¬è¨äºã¨åããã¦ã©ããã æ¬å®¶ http://socket.io/ 翻訳ãã¼ã¸ http://jxck.github.com/socket.io wiki https:/
Rubyã§ããgemã¿ãããªãã¤ã§ããã node.jsèªä½ã®ã¤ã³ã¹ãã¼ã«ã¯ãã¡ãã è¨å®ãã¡ã¤ã«ãä½ã£ã¦ãã äºãHOMEãã£ã¬ã¯ããªã«.npmrcã¨ããååã§è¨å®ãã¡ã¤ã«ãä½ã£ã¦ããã¾ãã # ~/.npmrc root = ~/.npm/libraries binroot = ~/.npm/bin manroot = ~/.npm/man ã¤ã³ã¹ãã¼ã« ã¤ã³ã¹ãã¼ã«ã¯1è¡ã§æ¸ã¿ã¾ãããæ軽ã $ curl http://npmjs.org/install.sh | sh å 容ãç¥ããã人ãç´æ¥ã¤ã³ã¹ãã¼ã«ããã®ãæã人ã¯ãä¸æ¦ãã¡ã¤ã«ã«ãªãã¤ã¬ã¯ãããã¨ããã¨æãã¾ãã $ curl http://npmjs.org/install.sh > install.sh $ vi install.sh PATHãéã ~/.bash_profileã«ä»¥ä¸ã®å 容ã追è¨ãã¦ããsourceã³ã
éçºç°å¢ãè¨å®ãã¦ã¿ã ååã®ï¼node.jsã¨npmã®ã¤ã³ã¹ãã¼ã«ãããã¡ã¢ï¼CentOS ãããã®VPSï¼ã§node.jsã¨npmãã¤ã³ã¹ãã¼ã«ãã¾ãããï¼ã¾ã ç°å¢è¨å®ãã§ãã¦ãªãã£ãã®ã§ä»åãå¼ãç¶ãä¸æºåï¼ (ä»®ã«) /hogehoge/public/dev/ ã§éçºãããã¨ã«ï¼ç°å¢ã®ãã£ã¬ã¯ããªæ§æã¨ãï¼ãµã¼ãã¼è¨å®ã«ã¤ãã¦ãã¾ãåèã«ãªãè¨äºãè¦ã¤ããããªãã£ãã®ã§ï¼ä»¥ä¸é©å½ã«è¨å®ããã¦ã¿ãï¼ãµã¼ãã¼ã¯ï¼nginxã使ãã¾ãï¼ ãã£ã¬ã¯ããªæ§æã®äºå® /hogehoge/public/dev/server.js : 8124ãlistenããHTTPãµã¼ãã¼çãªJSãã¡ã¤ã«ï¼ï¼ /hogehoge/public/dev/app/ : ãã®ä»libçã«ï¼nodeã§å®è¡ããJSãè¨ç½®ããï¼ /hogehoge/public/dev/www/ : å ¬éãã£ã¬ã¯ããªã¨ãã¦ï¼CSSãã¯ã©
Apr 13, 2011 ä»ã¾ã§Node.jsã®ç®¡çã¯naveã使ã£ã¦ãããã§ãããä»æ¥ãã¾ãã¾æ°ãåããã®ã§nvmã使ã£ã¦ã¿ãã¨ããããã¡ãã®ã»ããããæãã ã£ãã®ã§ä¹ãæãããã¨ã«ã nvmãnaveããããããªã¨æã£ãçç±ã¯ãNode.jsãã¤ã³ã¹ãã¼ã«ããã¨èªåçã«npmã®ææ°çãèªåã§ã¤ã³ã¹ãã¼ã«ãã¦ãããã¨ããã¨ãå¤ã«ã·ã§ã«ãå¤éèµ·åããªãã¨ããã«ããã¾ããnaveã ã¨useã³ãã³ãã®å®è¡æã«ã·ã§ã«ãåå®è¡ããã¦ç°å¢å¤æ°ã2度èªã¿è¾¼ã¾ãããããã®ã§ããªãã ãæ°æã¡æªããã§ãããã ã¨ããããã§ãnvmã使ã£ã¦ã»ããã¢ããããæ¹æ³ãã¡ã¢ãã¾ãã¯GitHubããnvmãåå¾ãã¾ããåã®å ´åã¯naveã使ã£ã¦ããæããããã¼ã ãã£ã¬ã¯ããªã«.nodeãã£ã¬ã¯ããªãä½ã£ã¦ãããã«ã¤ã³ã¹ãã¼ã«ããããã«ãã¦ãã¾ãã $ git clone git://github.com/creatio
è²ã ãã£ã¦node.jsã®ç°å¢ãæå ã§ä½ãäºã«ããã åå¥ç°å¢ã«node.jpãã¤ã³ã¹ãã¼ã«ããã«ã¯ãnvm以å¤ã«ãnaveããã£ããã©ãæ軽ãã¨æè¿ã®æ½®æµããå·ãã¨nvmã½ãã£ãã®ã§ãã¡ããå ¥ããéã®ã¡ã¢ã nvmã®ã¤ã³ã¹ãã¼ã« creationix/nvm · GitHub ãã¡ãã®éãã¤ã³ã¹ãã¼ã«ããã % sudo apt-get install build-essential libssl-dev ã¾ãã¯æå®ããã¦ããå¿ è¦ããã±ã¼ã¸ãã¤ã³ã¹ãã¼ã«ã ãã®å¾nvmãcloneãã¦å®è¡ããã % git clone git://github.com/creationix/nvm.git ~/.nvm % source ~/.nvm/nvm.sh source...ã®è¡ã¯.*shrcã«ãè¨è¿°ãã¦ããã % nvm install v0.5.8 % nvm use v0.5.8 % nv
è¿½è¨ ããã®å 容㯠Socket.IO ã®ãã¼ã¸ã§ã³ã v0.7 ã«ä¸ãã£ããã¨ã§ãå¤ããªãã¾ããã v0.7 ã«ã¤ãã¦ã¯ Socket.IO API 解説 - Block Rockinâ Codes ãåç §ãã¦ãã ããã æ¬æ ãªã¢ã«ã¿ã¤ã Webããã«ã½ã³ : ATND ã«åå ãã¾ããã ã¿ãªãã websocket ãç¨ãã¦éçºããæãã§ãwebsocket ã®å®è£ ã¨ãã¦ã¯ node.js ãçé ã« jetty ã ChannelAPI ã®è©±ãèãã¦ããªãå å®ããããã«ã½ã³ã ã£ãã¨æãã¾ãã ããã§èªå㯠node.js ã® websocket ã©ã¤ãã©ãªã§ãã socket.io ãããã£ã¦ããã§ããã ããã¤ãã¢ããªæ¸ãã¦ãå ±éããã®ã¯ä»¥ä¸ã®ãããªæãã ãªã¨ãããã¨ã§ç°¡åãªã¡ã¢ã socket.io ã§ã¨ã³ã¼ãµã¼ã websocket ã§ãªã¢ã«ã¿ã¤ã ãªã¢ããªã¨ãªãã¨ãsocket.
Logic-less templates. Available in Ruby, JavaScript, Python, Erlang, Elixir, PHP, Perl, Raku, Objective-C, Java, C#/.NET, Android, C++, CFEngine, Go, Lua, ooc, ActionScript, ColdFusion, Scala, Clojure[Script], Clojure, Fantom, CoffeeScript, D, Haskell, XQuery, ASP, Io, Dart, Haxe, Delphi, Racket, Rust, OCaml, Swift, Bash, Julia, R, Crystal, Common Lisp, Nim, Pharo, Tcl, C, ABAP, Elm, Kotlin, SQL,
Amazon Web Service(AWS)ãç¡æãã£ã¢ã2010/11/1ããå ¬éããã¾ãã(ãAmazon EC2ã1å¹´ééå®ã§ããªã¼ãã¢ã ãµã¼ãã¹ãéå§ãæ¥æ¬ã§ãå©ç¨å¯è½ãã¨ããç¡æã®ã¯ã©ã¦ããªã½ã¼ã¹ç»å ´: ã¢ãã¾ã³ã¯ã©ã¦ã(AWS)ãç¡æãã£ã¢(ç¡æ使ç¨æ )ãçºè¡¨ã)ã ããã§ãAWSã§node.jsãèµ·åããã¦ã¿ããã¨ã«ãã¾ããã ã¾ãã¯ç§ã®ã¹ããã¯ã¨ãã¦ãAWSã¯çµé¨ãããã¾ãããLinuxçµé¨ã¯ä»äºãå«ãã¦ããããããã¾ã(åç®çã«ã¯ãµã¼ã管çè ...?)ãå人ã§ã¬ã³ã¿ã«ãµã¼ããåããçµé¨ããã¾ããAWSã®æ¬ã¯1å(以ä¸ã«ãªã³ã¯ãã)ããèªãã§ãã¾ããããã®ã¹ããã¯ã§ã§AWSã§node.jsãèµ·åããã¦ã¿ã¾ããã AWSã®ã¢ã«ã¦ã³ãä½æããã¤ã³ã¹ã¿ã³ã¹ã®èµ·åã¾ã§ã¯ã以ä¸ãåèã«ãã¾ããã ã»Welcome to AWS User Group -Japan ã»ç¡æã§AWSï¼A
æ¯æ¥ããã°ãæ¸ãããã«ãããä½èª¿ãè¯ããªã£ã ããæ¥ãµã¨ããæè¿ã®èªåã¯ã¢ã¦ããããã«èç ã«ãªã£ã¦ãããªã¼ãã¨æããããããã¨ã³ããªãæ¸ããã daiksy.hatenablog.jp å 容ã¯ãéãªã¢ã¦ããããã§ãã ãããã¼ããèããæµ ããªãã¿ãããªãåãã®ç®ãå¥ãããããã¨ãæãã¦ããããèªåãéå°ã«æèããã»ã©â¦
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}