Ubuntu 安裝/測試 nodejs [How To Install Node JS In Ubuntu Linux]
Ubuntu 安裝/測試 nodejs [How To Install Node JS In Ubuntu Linux]
資料來源: https://www.youtube.com/watch?v=II7L8rpJ_6g
https://github.com/nodesource/distributions/blob/master/README.md
https://nodejs.org/en/about/
GITHUB:https://github.com/jash-git/How-To-Install-Node-JS-In-Ubuntu-Linux
$sudo apt-get install curl $sudo apt-get install python-software-properties #curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - $curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - $sudo apt-get update $sudo apt-get install -y nodejs $nodejs -v $npm -v
$gedit app.js const http = require('http'); const hostname = '127.0.0.1'; const port = 3000; const server = http.createServer((req, res) => { res.statusCode = 200; res.setHeader('Content-Type', 'text/plain'); res.end('Hello World\n'); }); server.listen(port, hostname, () => { console.log(`Server running at http://${hostname}:${port}/`); });
$nodejs app.js
2 thoughts on “Ubuntu 安裝/測試 nodejs [How To Install Node JS In Ubuntu Linux]”
電子檔出處
Node.js实战 中文版.pdf
https://pan.baidu.com/s/1Jf6F1a5EviXMquFqaZqnwA
7rad
Node入门一本全面地Node.js教程.pdf
https://pan.baidu.com/s/16id3ukl9dF0bWyz1SxK78Q
73dk
Node.js开发实战详解黄丹华Code.pdf
https://pan.baidu.com/s/1W8XGA5TZIGCyyYOZH-UG5w
sypv
http://pan.baidu.com/s/1gduuDWJ
紀錄:
01.在LINUX VPS 上 按照步驟實作依序實作 可以正確安裝 12.x 版的Node.js
02.確定可以正確運行app.js