[英]ExperimentalWarning: The http2 module is an experimental API
I am using HAPI JS with HTTP/2 in Node JS 10.9. 我在Node JS 10.9中将HAPI JS与HTTP / 2一起使用。 When I start the server using this example,
当我使用此示例启动服务器时,
const fs = require('fs')
const Hapi = require('hapi')
const http2 = require('http2')
const server = new Hapi.Server()
server.connection({
listener: http2.createServer(),
host: 'localhost',
port: 3000
})
server.route({
method: 'GET',
path:'/hello',
handler: function (request, reply) {
return reply('Hello, World!')
}
})
server.start((err) => {
if (err) console.error(err)
console.log(`Started ${server.connections.length} connections`)
})
I get this warning on the console 我在控制台上收到此警告
(node:16600) ExperimentalWarning: The http2 module is an experimental API.
I cannot find a relevant explanation on the internet that whether we can use it on Production Mode? 我无法在互联网上找到有关是否可以在生产模式下使用它的相关解释? Is it ok to use HTTP/2 on Production Mode with such warning?
可以在生产模式下将HTTP / 2与此类警告一起使用吗?
As @DoMiNeLa10 noted the experimental warning was dropped in 10.10: 正如@ DoMiNeLa10指出的,实验警告已在10.10中删除:
https://github.com/nodejs/node/pull/22716 : https://github.com/nodejs/node/pull/22716 :
http2 :
http2 :
◦ The http2 module is no longer experimental.
◦http2模块不再处于实验状态。 #22466
#22466
Good discussion here as to all the work involved in making it non-experimental: https://github.com/nodejs/node/issues/19453 关于使其成为非实验性的所有工作,这里进行了很好的讨论: https : //github.com/nodejs/node/issues/19453
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.