wetty=web+ttynode
先安裝 nvm , 便是Node Version Manager(Node版本管理器)
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
或者使用 wget
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
git
激活nvm:
source ~/.nvm/nvm.sh
github
安裝node
nvm install node
web
安裝完成後,切換到該版本
nvm use node
npm
開始安裝wetty
git clone https://github.com/krishnasrinivas/wetty
cd wetty
npm install
瀏覽器
從 Web 瀏覽器啓動 Wetty 並訪問 Linux 終端
node app.js -p 8080
bash
爲 Wetty 安裝 HTTPS 證書
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodes
app
經過 HTTPS 來使用 Wetty
nohup node app.js --sslkey key.pem --sslcert cert.pem -p 8080 &
curl