ExperimentalWarning: The http2 module is an experimental API

Viewed 6344

I am using HAPI JS with HTTP/2 in Node JS 10.9. 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?

1 Answers
Related