<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>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                ## HTTPS 和多服務器 ### HTTPS 為了創建使用 `HTTPS` 協議的應用程序,在傳遞給`NestFactory`的`create()`方法中設置`httpsOptions`屬性: ```typescript const httpsOptions = { key: fs.readFileSync('./secrets/private-key.pem'), cert: fs.readFileSync('./secrets/public-certificate.pem'), }; const app = await NestFactory.create(ApplicationModule, { httpsOptions, }); await app.listen(3000); ``` 如果使用`FastifyAdapter`,則創建應用如下: ```typescript const app = await NestFactory.create<NestFastifyApplication>( ApplicationModule, new FastifyAdapter({ https: httpsOptions }), ); ``` ### 多個同步服務器 下列方法展示了如何使用Nest應用同時監視多個端口(例如,在非HTTPS端口和HTTPS端口)。 ```typescript const httpsOptions = { key: fs.readFileSync('./secrets/private-key.pem'), cert: fs.readFileSync('./secrets/public-certificate.pem'), }; const server = express(); const app = await NestFactory.create( ApplicationModule, new ExpressAdapter(server), ); await app.init(); http.createServer(server).listen(3000); https.createServer(httpsOptions, server).listen(443); ``` > `ExpressAdapter` 需要從 `@nestjs/platform-express` 包導入。`http`和`https`包是原生的Node.js包。 > `GraphQL Subscriptions` 中該方法無法工作。
                  <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>

                              哎呀哎呀视频在线观看