nodejs 安装 postgresql module

# npm -gd install node-gyp

# export PATH=$PATH:/usr/local/pgsql/bin

# npm -gd install pg

 

for test:

# export NODE_PATH=/usr/local/nodejs/lib/node_modules

# vi sender.js

var pg = require('pg');

console.log('pg has installed successfully');

# node sender

if no error, means it works ok.

posted @ 2014-02-09 00:51  kylindai  阅读(1141)  评论(0编辑  收藏  举报