{"id":5331,"date":"2010-09-22T20:00:59","date_gmt":"2010-09-22T11:00:59","guid":{"rendered":"http:\/\/www.sssg.org\/blogs\/hiro345\/?p=5331"},"modified":"2010-09-24T06:38:17","modified_gmt":"2010-09-23T21:38:17","slug":"node-js","status":"publish","type":"post","link":"https:\/\/www.hiro345.net\/blogs\/hiro345\/archives\/5331.html","title":{"rendered":"node.js"},"content":{"rendered":"<p>2010\/09\/18\u306e\u8a71\u3067\u3059\u304c\u3001SSS(G)\u52c9\u5f37\u4f1a\u3067node.js\u306b\u3064\u3044\u3066\u8abf\u3079\u307e\u3057\u305f\u3002\u8a73\u7d30\u306f<a href=\"http:\/\/www.sssg.org\/public\/index.php?Node.js\">SSS(G)\u306enode.js\u306b\u3064\u3044\u3066\u306e\u30da\u30fc\u30b8<\/a>\u306b\u8a18\u8f09\u3055\u308c\u3066\u3044\u307e\u3059\u3002<!--more--><\/p>\n<p>\u3053\u306e\u4ed6\u3001CentOS\u4e0a\u3067node.js \u3092\u8a66\u3057\u3066\u307f\u305f\u306e\u3067\u3001\u305d\u306e\u3068\u304d\u306e\u30e1\u30e2\u3092\u516c\u958b\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<div class=\"code\" style=\"overflow: scroll; width: 490px; white-space: nowrap;background-color:black;color:white;padding:4px;\">&#x24;&nbsp;wget&nbsp;http&#x3a;&#x2f;&#x2f;nodejs.org&#x2f;dist&#x2f;node&#x2d;v0.2.2.tar.gz<br \/>\n&#x24;&nbsp;tar&nbsp;xzf&nbsp;node&#x2d;v0.2.2.tar.gz<br \/>\n&#x24;&nbsp;cd&nbsp;node&#x2d;v0.2.2<br \/>\n&#x24;&nbsp;.&#x2f;configure&nbsp;&#x2d;&#x2d;prefix=&#x2f;home&#x2f;koyama&#x2f;applications&#x2f;node.js<br \/>\n&#x24;&nbsp;make<br \/>\n&#x24;&nbsp;make&nbsp;install<br \/>\n&#x24;&nbsp;cd&nbsp;..<br \/>\n&#x24;&nbsp;vi&nbsp;example.js<br \/>\n&#x2d;&#x2d;&#x2d;&#x2d;<br \/>\nvar&nbsp;sys&nbsp;=&nbsp;require(&#x27;sys&#x27;),&nbsp;http&nbsp;=&nbsp;require(&#x27;http&#x27;)&#x3b;<br \/>\nhttp.createServer(function&nbsp;(req,&nbsp;res)&nbsp;{<br \/>\n&nbsp;&nbsp;setTimeout(function&nbsp;()&nbsp;{<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;res.writeHead(200,&nbsp;{&#x27;Content&#x2d;Type&#x27;&#x3a;&nbsp;&#x27;text&#x2f;plain&#x27;})&#x3b;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;res.end(&#x27;Hello&nbsp;World&#x5c;n&#x27;)&#x3b;<br \/>\n&nbsp;&nbsp;},&nbsp;2000)&#x3b;<br \/>\n}).listen(8000)&#x3b;<br \/>\nsys.puts(&#x27;Server&nbsp;running&nbsp;at&nbsp;http&#x3a;&#x2f;&#x2f;127.0.0.1&#x3a;8000&#x2f;&#x27;)&#x3b;<br \/>\n&#x2d;&#x2d;&#x2d;&#x2d;<br \/>\n&#x24;&nbsp;~&#x2f;applications&#x2f;node.js&#x2f;bin&#x2f;node&nbsp;example.js\n<\/div>\n<p>CentOS\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u306f\u3001gcc-c++ \u304c\u8db3\u308a\u306a\u304b\u3063\u305f<\/p>\n<div class=\"code\" style=\"overflow: scroll; width: 490px; white-space: nowrap;background-color:black;color:white;padding:4px;\">&#x23;&nbsp;yum&nbsp;install&nbsp;gcc&#x2d;c++\n<\/div>\n<p>\u53c2\u8003<br \/>\n<a href=\"http:\/\/www.slideshare.net\/mbleigh\/nodejs-and-ruby\">node.js and ruby<\/a><br \/>\n\u516c\u5f0f\u30b5\u30a4\u30c8 <a href=\"http:\/\/nodejs.org\/\">http:\/\/nodejs.org\/<\/a><br \/>\n\u65e5\u672c\u8a9e\u30b5\u30a4\u30c8 <a href=\"http:\/\/nodejs.jp\/nodejs.org_ja\/\">http:\/\/nodejs.jp\/nodejs.org_ja\/<\/a><br \/>\nNode.js\u3092\u4f7f\u3063\u3066\u3053\u3093\u306a\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3001\u30b5\u30a4\u30c8 <a href=\"http:\/\/howtonode.org\/\">http:\/\/howtonode.org\/<\/a><br \/>\nNode.js\u7528\u306eWeb\u30b5\u30fc\u30d3\u30b9\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af <a href=\"http:\/\/expressjs.com\/\">http:\/\/expressjs.com\/<\/a><br \/>\n\u3053\u3093\u306a\u611f\u3058\u306e\u624b\u9806\u3067\u3067\u304d\u308b\u304b\uff1f <a href=\"http:\/\/d.hatena.ne.jp\/vwxyz\/20100623\/1277262328\">http:\/\/d.hatena.ne.jp\/vwxyz\/20100623\/1277262328<\/a><br \/>\nsourceforge.jp\u3067\u306e\u30cb\u30e5\u30fc\u30b9\u3002 <a href=\"http:\/\/sourceforge.jp\/magazine\/10\/08\/23\/0343208\">http:\/\/sourceforge.jp\/magazine\/10\/08\/23\/0343208<\/a><br \/>\nredis key-value store  <a href=\"http:\/\/code.google.com\/p\/redis\/\">http:\/\/code.google.com\/p\/redis\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>2010\/09\/18\u306e\u8a71\u3067\u3059\u304c\u3001SSS(G)\u52c9\u5f37\u4f1a\u3067node.js\u306b\u3064\u3044\u3066\u8abf\u3079\u307e\u3057\u305f\u3002\u8a73\u7d30\u306fSSS(G)\u306enode.js\u306b\u3064\u3044\u3066\u306e\u30da\u30fc\u30b8\u306b\u8a18\u8f09\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[26,366,365],"class_list":["post-5331","post","type-post","status-publish","format-standard","hentry","category-program","tag-centos","tag-gcc-c","tag-node-js"],"_links":{"self":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts\/5331","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/comments?post=5331"}],"version-history":[{"count":5,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts\/5331\/revisions"}],"predecessor-version":[{"id":5362,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts\/5331\/revisions\/5362"}],"wp:attachment":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/media?parent=5331"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/categories?post=5331"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/tags?post=5331"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}