wetty 安裝

wetty=web+ttynode

一. 安裝環境 nodejs和nvm

  1. 先安裝 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 | bashgit

  2. 激活nvm:
    source ~/.nvm/nvm.shgithub

  3. 安裝node
    nvm install nodeweb

  4. 安裝完成後,切換到該版本
    nvm use nodenpm

二. 安裝 wetty

  1. 開始安裝wetty
    git clone https://github.com/krishnasrinivas/wetty
    cd wetty
    npm install瀏覽器

  2. 從 Web 瀏覽器啓動 Wetty 並訪問 Linux 終端
    node app.js -p 8080bash

  3. 爲 Wetty 安裝 HTTPS 證書
    openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodesapp

  4. 經過 HTTPS 來使用 Wetty
    nohup node app.js --sslkey key.pem --sslcert cert.pem -p 8080 &curl

附錄

相關文章
相關標籤/搜索