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

2016年5月15日 星期日

nodejs post data to mariadb 中文字相容性問題

檢查mariadb是否為utf-8格式

 mysqladmin -u root -p var | grep -E 'character|collation' | tr -s ' '













nodejs 

var client = require('mariasql');

記得要加上charset :'utf8'


範例
=================================
var client = require('mariasql');

var c =new client({
host:'your ip or dns',
user:'root',
password:'your password',
db:'your database name',
charset :'utf8'

});

=================================


2016年1月24日 星期日

nodejs 常用指令


開發工具:http://www.nodeclipse.org/


常用指令:

npm ls ~ 列出目前npm 已經安裝的模組

npm install [模組名稱] -g ~ 加-g代表是全域使用(只針對該專案就不用加)


進入debug模式:

1.command line 在你的專案下輸入
node --debug app.js

2.在nodeclipse中啟動偵錯


























3.使用RestClient觸發偵錯程序

chrome-extension://hgmloofddffdnphfgcellkdfbfbjeloo/RestClient.html




2015年12月24日 星期四

Ubuntu 安裝 Node js 步驟


先下載source code




複製下載網址



回到 ssh 畫面中輸入wget 然後按滑鼠右鍵貼上網址


下載完成後,解壓縮

tar xfz node-v0.x.xx.tar.gz 

接著進入該目錄執行以下動作

cd node-v0.x.xx

./configrue

make 

sudo make install 

最後輸入 node -v 有出現版本號就OK了



熱門文章