初識node.js

來源:互聯網
上載者:User

標籤:nbsp   瀏覽器   執行   server   iso   javascrip   --   json   代碼   

  1. node.js,server端的javascript。它同意在後端(瀏覽器外用環境)執行javascript代碼。
  2. 事件驅動、非同步式I/O的編程模式(單線程)是其核心。
  3. node.js的javascript引擎是v8。來自google chrome項目。V8號稱是眼下世界上最快的javascript引擎。
  4. node.js內建了httpserver支援,也就是說你能夠輕而易舉地實現一個網站和server的組合。
  5. commonnjs試圖定義一套普通應用程式使用的api。從而填補javascript標準庫過於簡單的不足。

    node.js是commonjs的實現。

  6. node包管理器(npm),可用於線上安裝一些應用。

  7. node的基本使用方法:node  xxx.js (指令檔名稱)   或者 node -e "xxxxxxxxx"(能夠直接執行的代碼)
  8. node 斷行符號 -->repl(read-eval-print loop)模式。連續按兩次ctrl+c就可以退出repl模式。
  9. 使用supervisor可重新整理指令碼、用於調試  ,安裝:npm install -g supervisor        啟動應用:supervisor app.js
  10. 模組是node.js應用程式的基本組成部分,檔案和模組是一一相應的。
  11. node.js的包是一個檔案夾,最上層資料夾下有package.json
  12. 用node啟動angular-seed-master:  node scripts/web-server.js

初識node.js

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.