<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                [TOC] ## node特性 1. Node.js 使用事件驅動模型,當web server接收到請求,就把它關閉然后進行處理,然后去服務下一個web請求。 當這個請求完成,它被放回處理隊列,當到達隊列開頭,這個結果被返回給用戶。 ## 新建一個http服務器 ``` // 引入http模塊 var http = require('http'); //創建一個http服務器,監聽在8888端口 http.createServer(function(request, response) { //設置返回頭 response.writeHead(200, {'Content-Type' : 'text/plain'}); response.end('Hello World'); }).listen(8888) ``` ## npm包管理器 `npm install <module>`本工程內安裝模塊 `npm install <module> -g` 全局安裝模塊 `npm list`、`npm ls`查看已安裝模塊 `npm update <module>` 更新模塊 `npm search <module>`搜索模塊 `npm init`創建模塊 `npm cache clear`清空本地緩存 ## 事件觸發器EventEmitter ``` // 引入 events 模塊 var events = require('events'); // 創建 eventEmitter 對象 var eventEmitter = new events.EventEmitter(); ``` 注冊事件 ~~~ emitter.on('someEvent', function(arg1, arg2) { ????console.log('listener1', arg1, arg2); }); ~~~ 觸發事件 ~~~ emitter.emit('someEvent', 'arg1 參數', 'arg2 參數'); ~~~ ## 模塊系統 ~~~ exports.world = function() { console.log('Hello World'); } ~~~ 1. 添加項目依賴項`npm install --save <module>` 2. 刪除項目依賴項`npm rm <module --save`
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看