[英]http2 in node.js, express, socket.io client
我正在構建一個 web 應用程序,該應用程序在后端使用 express 和 node.js。 在我的server.js
文件中,我有以下代碼
const express = require("express");
const app = express();
const server = require("http").Server(app);
const io = require("socket.io")(server);
我最近發現有 http2 可用,我應該將第 3 行更改為const server = require("http2").Server(app);
反而?
如果我切換到 http2,我是否需要專門更改 http1 中不存在的其他內容? 從http1到http2發送HTTP請求(例如get或post)的方式是否有任何不同?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.