http2-express 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc +35 -0
- package/README.md +2 -0
- package/dist/initHttp2Express.js +2 -3
- package/dist/initHttp2ExpressOLD_ORIG.js +24 -0
- package/package.json +1 -1
- package/src/initHttp2Express.js +3 -2
- package/src/initHttp2ExpressOLD_ORIG.js +22 -0
- package/example/.babelrc +0 -3
- package/example/certs/server-cert.pem +0 -35
- package/example/certs/server-key.pem +0 -54
- package/example/package-lock.json +0 -5710
- package/example/package.json +0 -48
- package/example/src/server.js +0 -24
package/example/package.json
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "http2-express",
|
|
3
|
-
"description": "HTTP/2 support for Express",
|
|
4
|
-
"version": "1.0.0",
|
|
5
|
-
"author": "Mark Jovis",
|
|
6
|
-
"contributors": [
|
|
7
|
-
"Mark Jovis <mark.jovis@hotmail.com>"
|
|
8
|
-
],
|
|
9
|
-
"license": "MIT",
|
|
10
|
-
"keywords": [
|
|
11
|
-
"express",
|
|
12
|
-
"http2",
|
|
13
|
-
"https",
|
|
14
|
-
"push",
|
|
15
|
-
"support",
|
|
16
|
-
"compatibility",
|
|
17
|
-
"api",
|
|
18
|
-
"server"
|
|
19
|
-
],
|
|
20
|
-
"main": "dist/index.js",
|
|
21
|
-
"module": "dist/index.js",
|
|
22
|
-
"scripts": {
|
|
23
|
-
"start": "NODE_ENV=localdev nodemon src/server.js -e js,json",
|
|
24
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
25
|
-
},
|
|
26
|
-
"devDependencies": {
|
|
27
|
-
"@babel/cli": "^7.23.9",
|
|
28
|
-
"@babel/eslint-parser": "^7.23.10",
|
|
29
|
-
"@babel/preset-env": "^7.23.9",
|
|
30
|
-
"eslint": "^8.57.0",
|
|
31
|
-
"eslint-config-airbnb-base": "^15.0.0",
|
|
32
|
-
"eslint-plugin-import": "^2.29.1"
|
|
33
|
-
},
|
|
34
|
-
"dependencies": {
|
|
35
|
-
"express": "^4.21.1"
|
|
36
|
-
},
|
|
37
|
-
"engines": {
|
|
38
|
-
"node": ">= 20.0.0"
|
|
39
|
-
},
|
|
40
|
-
"repository": {
|
|
41
|
-
"type": "git",
|
|
42
|
-
"url": "https://github.com/markjovis/http2-express.git"
|
|
43
|
-
},
|
|
44
|
-
"bugs": {
|
|
45
|
-
"url": "https://github.com/markjovis/http2-express/issues"
|
|
46
|
-
},
|
|
47
|
-
"homepage": "https://github.com/markjovis/http2-express#readme"
|
|
48
|
-
}
|
package/example/src/server.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
const express = require('express');
|
|
2
|
-
const http2 = require('http2');
|
|
3
|
-
const fs = require('fs');
|
|
4
|
-
|
|
5
|
-
const http2Express = require('../../dist');
|
|
6
|
-
|
|
7
|
-
const app = http2Express(express);
|
|
8
|
-
|
|
9
|
-
app.get('/', (req, res) => {
|
|
10
|
-
res.send('Hello World!');
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
const options = {
|
|
14
|
-
key: fs.readFileSync('certs/server-key.pem'),
|
|
15
|
-
cert: fs.readFileSync('certs/server-cert.pem'),
|
|
16
|
-
passphrase: 'Test123',
|
|
17
|
-
allowHTTP1: false
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const server = http2.createSecureServer(options, app);
|
|
21
|
-
|
|
22
|
-
server.listen(44320, () => {
|
|
23
|
-
console.info('Listening on port 44320...');
|
|
24
|
-
});
|