mikroserve 0.0.9 → 1.0.0
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/README.md +2 -2
- package/lib/MikroServe.js +1 -1
- package/lib/MikroServe.mjs +1 -1
- package/lib/{chunk-SLBFEKEH.mjs → chunk-TQN6BEGA.mjs} +1 -1
- package/lib/index.js +1 -1
- package/lib/index.mjs +1 -1
- package/package.json +1 -4
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
15
|
-
- Native Node.js [http](https://nodejs.org/api/http.html)/[https](https://nodejs.org/api/https.html) implementation, meaning maximum performance
|
|
15
|
+
- Native Node.js [http](https://nodejs.org/api/http.html)/[https](https://nodejs.org/api/https.html)/[http2](https://nodejs.org/api/http2.html) implementation, meaning maximum performance
|
|
16
16
|
- [Hono](https://hono.dev)-style API semantics for GET, POST, PATCH, PUT, DELETE operations
|
|
17
17
|
- Supports being exposed over HTTP, HTTPS, and HTTP2
|
|
18
18
|
- Supports custom middlewares
|
|
@@ -212,10 +212,10 @@ All of the settings already presented in the above examples can be provided in m
|
|
|
212
212
|
| --cert | `<string>` | sslCert | |
|
|
213
213
|
| --key | `<string>` | sslKey | |
|
|
214
214
|
| --ca | `<string>` | sslCa | |
|
|
215
|
-
| --debug | none (is flag) | debug | DEBUG |
|
|
216
215
|
| --ratelimit | none (is flag) | rateLimit.enabled | |
|
|
217
216
|
| --rps | `<number>` | rateLimit.requestsPerMinute | |
|
|
218
217
|
| --allowed | `<comma-separated strings>` | allowedDomains | |
|
|
218
|
+
| --debug | none (is flag) | debug | DEBUG |
|
|
219
219
|
|
|
220
220
|
### Order of application
|
|
221
221
|
|
package/lib/MikroServe.js
CHANGED
|
@@ -438,7 +438,7 @@ var MikroServe = class {
|
|
|
438
438
|
this.setupGracefulShutdown(server);
|
|
439
439
|
server.listen(port, host, () => {
|
|
440
440
|
const address = server.address();
|
|
441
|
-
const protocol = this.config.useHttps ? "https" : "http";
|
|
441
|
+
const protocol = this.config.useHttps || this.config.useHttp2 ? "https" : "http";
|
|
442
442
|
console.log(
|
|
443
443
|
`MikroServe running at ${protocol}://${address.address !== "::" ? address.address : "localhost"}:${address.port}`
|
|
444
444
|
);
|
package/lib/MikroServe.mjs
CHANGED
|
@@ -91,7 +91,7 @@ var MikroServe = class {
|
|
|
91
91
|
this.setupGracefulShutdown(server);
|
|
92
92
|
server.listen(port, host, () => {
|
|
93
93
|
const address = server.address();
|
|
94
|
-
const protocol = this.config.useHttps ? "https" : "http";
|
|
94
|
+
const protocol = this.config.useHttps || this.config.useHttp2 ? "https" : "http";
|
|
95
95
|
console.log(
|
|
96
96
|
`MikroServe running at ${protocol}://${address.address !== "::" ? address.address : "localhost"}:${address.port}`
|
|
97
97
|
);
|
package/lib/index.js
CHANGED
|
@@ -440,7 +440,7 @@ var MikroServe = class {
|
|
|
440
440
|
this.setupGracefulShutdown(server);
|
|
441
441
|
server.listen(port, host, () => {
|
|
442
442
|
const address = server.address();
|
|
443
|
-
const protocol = this.config.useHttps ? "https" : "http";
|
|
443
|
+
const protocol = this.config.useHttps || this.config.useHttp2 ? "https" : "http";
|
|
444
444
|
console.log(
|
|
445
445
|
`MikroServe running at ${protocol}://${address.address !== "::" ? address.address : "localhost"}:${address.port}`
|
|
446
446
|
);
|
package/lib/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mikroserve",
|
|
3
3
|
"description": "Minimalistic, ready-to-use API, built on Node.js primitives.",
|
|
4
|
-
"version": "0.0
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"author": "Mikael Vesavuori",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"keywords": [
|
|
@@ -31,9 +31,6 @@
|
|
|
31
31
|
"!/lib/**/*.map",
|
|
32
32
|
"!/tests"
|
|
33
33
|
],
|
|
34
|
-
"bin": {
|
|
35
|
-
"mikroserve": "lib/index.js"
|
|
36
|
-
},
|
|
37
34
|
"scripts": {
|
|
38
35
|
"test": "npm run test:licenses && npm run test:types && npm run lint && npm run test:unit",
|
|
39
36
|
"test:types": "npx type-coverage --at-least 85 --strict --ignore-files \"tests/**/*.ts\" --ignore-files \"*.ts\" --ignore-files \"src/application/errors/*.ts\" --ignore-files \"testdata/*.ts\"",
|