http2 test app listening on port 8080 - works only on http
486
http2 test app listening on port 8080 - works only on http
to run you can use:
docker run -p 8080:8080 valda/http2-test
server.js file:
var options = {
plain: true
};
require('http2').raw.createServer(options, function(request, response) {
response.end('Hello world from HTTP2!');
}).listen(8080);
package.json file:
{
"name": "nodehttp2",
"version": "1.0.0",
"main": "server.js",
"scripts": {
"start": "node server.js"
},
"author": "",
"license": "ISC",
"dependencies": {
"http2": "^3.3.6"
}
}
Dockerfile:
FROM node:7-alpine
# Create app directory
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Install app dependencies
COPY package.json /usr/src/app/
RUN npm install
# Bundle app source
COPY server.js /usr/src/app
EXPOSE 8080
CMD [ "npm", "start" ]
Content type
Image
Digest
Size
19.9 MB
Last updated
over 9 years ago
docker pull valda/http2-test