node的安裝與hello world

2021-07-28 08:00:51 字數 487 閱讀 8839

一、mac安裝node:

1.使用homebrew安裝即可:

brew install node

2.安裝成功後,可以使用以下命令檢視node的版本:

node -v

二、建立hello world的web程式:

1.建立乙個hello.js檔案,寫入:

console.log("httpd start @8000");2.cd到此js所在的目錄,然後執行:

node hello.js

3.開啟瀏覽器,輸入localhost:8000即可以看到hello world

node 安裝與更新

參考 1.使用 brew 或者 n 管理 node.js on mac brew install non linux,n install allows installation directly from github for instance 參考 curl l bash n successful...

MAC下安裝nvm與Node

curl o bash切換到 home下面 cd,然後回車 cd檢視 cat bash profile 沒有的話 建立 touch bash profile將控制台安裝後提示的export拷貝到.bash profile中 vim bash file重啟控制台命令 備註nvm ls remote 顯...

基於storyboard的helloworld程式

本單元教程基於 程式設計師長弓 張燕廣 的 iphone開發教程,使用最新版的 ios9 和 xcode7 作為開發工具編譯執行。鏈結位址 iphone開發 一 從helloworld開始 任何程式開發的學習都是從helloworld開始的,那麼如何建立ios開發的第乙個helloworld程式呢?...