顯示具有 nodejs 標籤的文章。 顯示所有文章
顯示具有 nodejs 標籤的文章。 顯示所有文章

2013年7月3日 星期三

Node.JS jQuery Library

Install :
$ npm install jquery
 
 
test.js
require("node-jquery");

a = ['aaa', 'bbb', 'ccc', 'ddd'];

$.each(a, function(key, val) { console.log(key + " => " + val); });


Run :
$ node test.js
0 => aaa
1 => bbb
2 => ccc
3 => ddd




Reference :
jquery

2013年4月23日 星期二

/usr/bin/env: node: No such file or directory

# ln -s /usr/bin/nodejs /usr/bin/node




Reference :
run npm command gives error \"/usr/bin/env: node: No such file or directory\" · Issue #3911 · joyent/node · GitHub

debian 安裝 nodejs、npm

nodejs - Node.js event-based server-side javascript engine
npm - package manager for Node.js


nodejs 和 npm 還在 debian sid,還沒進 wheezy


套件庫安裝方式:
# vi /etc/apt/sources.list
deb http://ftp.de.debian.org/debian sid main
# apt-get update
# apt-get install nodejs npm


手動安裝方式可參考:


於 Debian Linux (wheezy) 安裝 Node.js | Tsung's Blog