- 源码安装
- 系统管理安装
- cnpm安装
nodejs并更新至最新版
系统: CentOS release 6.9 (Final)
sudo yum install -y nodejs
sudo yum install -y npm
sudo npm install -g cnpm --registry=https://registry.npm.taobao.org
sudo npm install -g n
sudo n stable
node -v
搭建 Websocket 转 Socket ws-to-tpc
//安装
npm install -g ws-to-tcp
//启动 from websocket端口 to TCP端口
ws-to-tcp --from 8000 --to 9000