Skip to content

Commit 05890f7

Browse files
committed
导入历史代码
1 parent 8f97fd1 commit 05890f7

File tree

599 files changed

+5113
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

599 files changed

+5113
-0
lines changed

.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = tab
6+
trim_trailing_whitespace = true
7+
8+
[*.{md,txt}]
9+
trim_trailing_whitespace = false
10+
11+
[{*.yml,*.yaml,package.json}]
12+
indent_style = space
13+
indent_size = 2

.vscode/launch.json

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"type": "node",
6+
"request": "launch",
7+
"name": "Debug Tests(Current)",
8+
"runtimeExecutable": "mocha",
9+
"runtimeArgs": [
10+
"-r",
11+
"ts-node/register/transpile-only",
12+
"--ui",
13+
"exports",
14+
"--colors",
15+
"--no-timeout",
16+
"${relativeFile}"
17+
],
18+
"internalConsoleOptions": "openOnSessionStart",
19+
"skipFiles": [
20+
"<node_internals>/**",
21+
"node_modules/mocha/**",
22+
"node_modules/ts-node/**",
23+
"node_modules/v8-compile-cache/**"
24+
]
25+
},
26+
{
27+
"type": "node",
28+
"request": "launch",
29+
"name": "Debug Tests",
30+
"runtimeExecutable": "mocha",
31+
"runtimeArgs": [
32+
"-r",
33+
"ts-node/register/transpile-only",
34+
"--ui",
35+
"exports",
36+
"--colors",
37+
"--no-timeout",
38+
"${workspaceFolder}/**/*.test.ts"
39+
],
40+
"internalConsoleOptions": "openOnSessionStart",
41+
"skipFiles": [
42+
"<node_internals>/**",
43+
"node_modules/mocha/**",
44+
"node_modules/ts-node/**",
45+
"node_modules/v8-compile-cache/**"
46+
]
47+
},
48+
{
49+
"type": "node",
50+
"request": "attach",
51+
"name": "Attach",
52+
"skipFiles": [
53+
"<node_internals>/**",
54+
"node_modules/mocha/**",
55+
"node_modules/ts-node/**",
56+
"node_modules/v8-compile-cache/**"
57+
]
58+
}
59+
]
60+
}

.vscode/settings.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"editor.insertSpaces": false,
3+
"[yaml]": {
4+
"editor.insertSpaces": true,
5+
"editor.tabSize": 2
6+
}
7+
}

.vscode/tasks.json

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"group": {
6+
"kind": "build",
7+
"isDefault": true
8+
},
9+
"label": "Build",
10+
"type": "shell",
11+
"command": "npm run build --silent",
12+
"problemMatcher": [],
13+
"presentation": {
14+
"showReuseMessage": false,
15+
"clear": true
16+
}
17+
},
18+
{
19+
"group": "build",
20+
"label": "Watch",
21+
"type": "shell",
22+
"command": "npm run watch --silent",
23+
"problemMatcher": [],
24+
"presentation": {
25+
"showReuseMessage": false,
26+
"clear": true
27+
}
28+
},
29+
{
30+
"group": "test",
31+
"label": "Test",
32+
"type": "shell",
33+
"command": "npm run test --silent",
34+
"problemMatcher": [],
35+
"presentation": {
36+
"showReuseMessage": false,
37+
"clear": true
38+
}
39+
},
40+
{
41+
"group": "test",
42+
"label": "Coverage",
43+
"type": "shell",
44+
"command": "npm run coverage --silent",
45+
"problemMatcher": [],
46+
"presentation": {
47+
"showReuseMessage": false,
48+
"clear": true
49+
}
50+
},
51+
{
52+
"group": {
53+
"kind": "test",
54+
"isDefault": true
55+
},
56+
"type": "shell",
57+
"label": "Coverage(Current)",
58+
"command": "npm run coverage \"${relativeFile}\" --silent",
59+
"problemMatcher": [],
60+
"presentation": {
61+
"showReuseMessage": false,
62+
"clear": true
63+
}
64+
}
65+
]
66+
}

README.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# H2Server
2+
An out-of-the-box web server for serving up local files, support https & http2.
3+
4+
![overview][overview]
5+
6+
## Installation
7+
First, install [Node.js](http://nodejs.org/). Then:
8+
9+
```bash
10+
npm install h2server -g
11+
```
12+
13+
## Usage
14+
Run `h2server` on the command line to fire up an HTTP/1.1 server on 0.0.0.0:
15+
```bash
16+
h2server
17+
```
18+
19+
H2Server will serve out of your current working directory.
20+
21+
You can pass in arguments to change the port and host:
22+
```bash
23+
h2server 8080
24+
```
25+
26+
In order to support HTTP/2, you should specify an https url:
27+
```bash
28+
h2server https://0.0.0.0:8080
29+
```
30+
By default, H2server will use an untrusted self-signed certificate. You should skip the certificate warning in browser. Pass `--cert` and `--key` to specify your certificate.
31+
32+
In additional, you can pass `-o`/`--open` to open homepage in browser when started:
33+
```bash
34+
h2server -o
35+
```
36+
37+
## Options
38+
- `--open`, `-o`: Open browser after starting the server
39+
- `--help`, `-h`, `-?`: Print helps
40+
- `--cors`: Enable CORS via the Access-Control-Allow-Origin header
41+
- `--proxy`, `-p`: Proxies all requests which can't be resolved locally to the given url. e.g.: -p http://someurl.com
42+
- `--cert`: Path to ssl cert file
43+
- `--key `: Path to ssl key file
44+
- `--version`, `-v`: Print version
45+
46+
[overview]: https://github.com/Teal/H2Server/blob/master/screenshot.png?raw=true

data/assets/livereload.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

data/cert/cert.cer

1.01 KB
Binary file not shown.

data/cert/cert.pem

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
-----BEGIN CERTIFICATE-----
2+
MIIECTCCAvGgAwIBAgIHAVWElgZgNDANBgkqhkiG9w0BAQsFADBlMRIwEAYDVQQD
3+
Ewlsb2NhbGhvc3QxCzAJBgNVBAYTAkNOMREwDwYDVQQIEwhoYW5nemhvdTERMA8G
4+
A1UEBxMIaGFuZ3pob3UxDTALBgNVBAoTBFRlYWwxDTALBgNVBAsTBFRlc3QwIBcN
5+
OTkxMjMxMTYwMDAwWhgPMjk5ODEyMzExNjAwMDBaMGUxEjAQBgNVBAMTCWxvY2Fs
6+
aG9zdDELMAkGA1UEBhMCQ04xETAPBgNVBAgT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h9D0+ENzwxTcDNTLcGwX8PRAA4B9ZcknSxL5Kta56tByMt
23+
6sVt8wF7BYLLMnb/8LrJ/e0eyEIwJ9cqkAL2wKo=
24+
-----END CERTIFICATE-----

data/cert/key.pem

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
-----BEGIN RSA PRIVATE KEY-----
2+
MIIEowIBAAKCAQEAv2Cek4bY+F5A60P0O9SD1b+v3Mtj6klpMs3tNpnQSo+NgPht
3+
9O+Fx6xxQeKorQCXtJIqYlhPoGuagyEDQUa5CTiEil8e5UihmYyhUSXzVFwOKe4T
4+
hAYgQ8D49EmpkuXsW8ZGDQ4NX9hDmx3GAYqR/ZbxNZvgZ3/IjRvDSdaLjetMnhCA
5+
VPVcLwESZZOE+DheJS2UC51HGVAOSDvih/WD776kZ5XKp1EVfBOhIQrmFHMkHsqX
6+
lmwKCVT7LKh3oJKMw7uHa9/yB08ballxYiZuPqOF5G9JTXon/yFNBF74jAGKWc23
7+
yYjHu3V7kZgaNrh/zlCiGvRUkhffRB5bTEsH0QIDAQABAoIBABxr+AEG5NA2B0Qp
8+
ams8S3wCJNcQqb0Qu/vck18phsKcATLnMkVPETovRP64774JuX4Kuxqx7NlxQZg5
9+
3ebi3vYcm6qFJ+x7Veyc8xQ/I50issPNZL6VvlLxpMd67SEw3mJe1uZ3cMsMLjYq
10+
PM7byoSz1wzUIoacdqdmOSGNKFqiFinzaOF9iyuI3x9otuN8BAXAuSO16E25byS3
11+
6mmvBnvWdkYhNl0clchTwqZzeIGYzqsSaTLdZWRJcicma6NKAuxW2gZRl9XiMjmn
12+
6cN/fT+dJgg/s5IFMbD7IgnDCAIEEwdKhdY0Pp+EKl0swheMQOkQ2sd2748Pdv0O
13+
vRq7ogECgYEA+Al1jtxxKPjKIh6+Up3vT4JVKfuTa/xd5dOC9ULuyZLnaf7Q5XLy
14+
3Ccn7oYxnJmpWV4zswxhHUIN6tynXZH/8xqUZV1V3Wl1VG5ASf/t4jAOTN/qXKUN
15+
oxFVfdv0/7b7CdSGBQkduLKoZJIKpgW4TbpM6HGFA+gsaiD/D3gUa2ECgYEAxYV+
16+
HtGJ1nENO3Dyb95TRoIbES0FueBuadbhgf5C+2lqJlM2+0o6Ai2cXuESmc4UTKLW
17+
58RkSxSVkH592+mMXGt63rEz4kmuvnC+xKkSksLmnHt9zSD5MP5lwYJ/VeNpG6sJ
18+
Hy1BPh8p4yx/+udRqwHzeXnV0H4tr3Y+njH84nECgYALCUC1zpEqZYd45S1Kt8RC
19+
IWZwq8TvdRcodrTI/OVrCqJJUREyZF7x9LwOHOJwOVYTp+FdAhwAFURRQugffbOJ
20+
uZEIwZJke6DA1Pb/U+fdvI2mVgAzhxSIQOkw5GyORDH/Sfl8l98+rJRZhTX8FR0S
21+
OEvbu9FTTy1Ku5UdtxYRgQKBgEl8FqXkkwFi4edhZ/DSp+ytbuB+/YhfxPQ/a3pv
22+
XAApAcLsZqIqxVYWHfz2g3MRRmAUnRtw51c/ez1csfpk80FXA0liZ8kiXI6hZ3fG
23+
5xAOzrkdAHqWb98YZkcOA82yY2JVyXj93y37bhwEbECuWqXiffCNsUx2BQ0oUreM
24+
JWchAoGBAOosjOOsTZcOeBYn2siPTI8ckn9Pjl2NfIx3mGpKtPXYUS9+4A55Lz+x
25+
rlb8WdFJtBknSONm5zCSRw/DxBf9m7it2i+1Cju0n8MSi5LPFSEYDYZ9kKq909O+
26+
7N9Mq0yoAsPl82TYElWRkbLkFOQpCZHOv2uISg3Y13VuorjwFz+/
27+
-----END RSA PRIVATE KEY-----

data/icons/default/back.svg

+1
Loading

data/icons/default/dir.svg

+1
Loading

data/icons/default/file.svg

+1
Loading

data/icons/default/home.svg

+1
Loading

data/icons/default/root.svg

+1
Loading

data/icons/dir/android.svg

+1
Loading

data/icons/dir/api.svg

+1
Loading

data/icons/dir/app.svg

+1
Loading

data/icons/dir/arangodb.svg

+1
Loading

data/icons/dir/asset.svg

+1
Loading

data/icons/dir/audio.svg

+1
Loading

data/icons/dir/aurelia.svg

+1
Loading

0 commit comments

Comments
 (0)