node.jsãé¢ç½ãããªã®ã§ç°å¢æ§ç¯ãã¦ã¿ã
åã®ä¸ã§ãã¤ãæ¬æ ¼çã«ãããã¨æã£ã¦ããè¨èªã®ä¸ã¤ãJavaScriptãªãã§ããã©ãã¾ããä»äºã趣å³ã§ã¯JQueryã§ãè¶ãæ¿ãã¦ãã¦ãããã§ãããnode.jsãç¥ã£ã¦ããã¯ä¿ç¶èå³ãåºã¦ãã¾ããã
ç¹ã«Express on Railwayã¨ããååã©ãããä¸èº«ã¾ã§Railsãã£ãããªãã¬ã¼ã ã¯ã¼ã¯ãåºã¦ãããããã®ã§ããããããã£ã¦ã¿ããããªã¨ãæ°ã«ãªãã¾ããã
ã¨ããããã§ç°å¢æ§ç¯ãã
ã½ã¼ã¹ãããã«ããã¦ããããã©ããã¼ã¸ã§ã³ã¢ãããæ©ãã®ã§rvmã®ãããªãã¼ã¸ã§ã³ç®¡çã·ã¹ãã ã®nvmã使ããã¨ã«ãã¾ãã
git clone git://github.com/creationix/nvm.git ~/.nvm
ããã§å°ãããã£ããã§ãããããShellãzshã®å ´åãç°å¢å¤æ°ã®ã»ããããã¾ãããã¾ããã
ãããªã /srcã¨ããã£ã¬ã¯ããªãä½ããã¦ã³ã£ããããw
~/.nvm/nvm.shãéãã¨bashã§ããåããªãããã§ãã
#export NVM_DIR=$(dirname ${BASH_ARGV[0]})
export NVM_DIR=/Users/hoge/.nvm
export NVM_DIR=$(cd $(dirname ${BASH_SOURCE[0]:-$0}); pwd)
ã¨ããããå¼æ°ã§ã¯ãªããã«ãã¹ã§æ¸ãã¦ããã¾ãã
bashã§ã¯åããªããã§zshã§åãããã«ãã¾ãã
. ~/.nvm/nvm.sh nvm install v0.3.7
ããã§nvmã¨node,ããã±ã¼ã¸ç®¡çã§ããnpmãå
¥ãã¾ããã
å¾ã¯å¿
è¦ã«å¿ãã¦ã©ã¤ãã©ãªãnpmã§å
¥ãã¦ããã ãã§ãã
ãã¨ã¯.zshrcã®ã©ããã«ä¸è¨ãæ¸ãã¦ããã¾ãã
. ~/.nvm/nvm.sh
nvm use v0.3.7
ã¨ãããã使ããããªãã®ãããã¦ããã¾ãã
npm install node-dev npm install node-inspector npm install express npm install express-on-railway npm install mysql npm install mongodb
MySQLã¯ã¨ãããMongoDBã®ã¢ããã¿ãããã¨ã¯ããã
ã¨ãããç°å¢ã¯å®æããã®ã§æ¬¡ããã¯ã¢ããªãä½ã£ã¦ããã¾ãï¼ï¼