zero-http 0.2.2 → 0.2.4

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 CHANGED
@@ -1,4 +1,8 @@
1
- # zero-http
1
+ <p align="center">
2
+ <img src="documentation/public/vendor/icons/logo.svg" alt="zero-http logo" width="300" height="300">
3
+ </p>
4
+
5
+ <h1 align="center">zero-http</h1>
2
6
 
3
7
  [![npm version](https://img.shields.io/npm/v/zero-http.svg)](https://www.npmjs.com/package/zero-http)
4
8
  [![npm downloads](https://img.shields.io/npm/dm/zero-http.svg)](https://www.npmjs.com/package/zero-http)
@@ -45,10 +49,10 @@ app.listen(3000)
45
49
 
46
50
  ## Demo
47
51
 
48
- You can view the live documentation and playground at https://zero-http.molex.cloud, or run the demo locally:
52
+ You can view the live documentation and playground at https://z-http.com, or run the demo locally:
49
53
 
50
54
  ```bash
51
- node documentation/full-server.js
55
+ npm run docs
52
56
  # open http://localhost:3000
53
57
  ```
54
58
 
@@ -179,25 +179,15 @@ app.get('/debug/routes', (req, res) =>
179
179
  res.send(JSON.stringify(app.routes(), null, 2));
180
180
  });
181
181
 
182
- // --- TLS Certificates (HTTPS + WSS) ---
183
- const certPath = '/www/server/panel/vhost/cert/zero-http.molex.cloud/fullchain.pem';
184
- const keyPath = '/www/server/panel/vhost/cert/zero-http.molex.cloud/privkey.pem';
185
- const hasCerts = fs.existsSync(certPath) && fs.existsSync(keyPath);
186
-
187
- const tlsOpts = hasCerts
188
- ? { cert: fs.readFileSync(certPath), key: fs.readFileSync(keyPath) }
189
- : undefined;
190
182
 
191
183
  // --- Server Startup ---
192
- const port = process.env.PORT || 7273;
193
- const server = app.listen(port, tlsOpts, () =>
184
+ const port = process.env.PORT || 3000;
185
+ const server = app.listen(port, () =>
194
186
  {
195
- const proto = hasCerts ? 'https' : 'http';
196
- console.log(`zero-http full-server listening on ${proto}://localhost:${port}`);
187
+ console.log(`zero-http full-server listening on http://localhost:${port}`);
197
188
  if (process.argv.includes('--test')) runTests(port).catch(console.error);
198
189
  });
199
190
 
200
-
201
191
  /** Quick smoke tests using built-in fetch */
202
192
  async function runTests(port)
203
193
  {
@@ -41,9 +41,12 @@
41
41
  </svg>
42
42
  </button>
43
43
 
44
- <a class="brand" href="#top" id="brand-top" style="text-decoration:none;color:inherit;cursor:pointer">
45
- <div class="logo">zero-http</div>
46
- <div class="subtitle">Zero-dependency Express-like server</div>
44
+ <a class="brand" href="#top" id="brand-top" style="text-decoration:none;color:inherit;cursor:pointer;display:flex;align-items:center;gap:12px">
45
+ <img src="/vendor/icons/logo.svg" alt="zero-http logo" class="header-logo" width="50" height="50" />
46
+ <div>
47
+ <div class="logo">zero-http</div>
48
+ <div class="subtitle">Zero-dependency Express-like server</div>
49
+ </div>
47
50
  </a>
48
51
 
49
52
  <div class="repo-buttons" role="navigation" aria-label="Repository links">
@@ -26,6 +26,7 @@ html{font-size:18px}
26
26
  body{height:100%;margin:0;background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased;line-height:1.6;font-family:'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif}
27
27
  .ui-shell{max-width:1300px;margin:24px auto;padding:28px}
28
28
  .ui-header{display:flex;align-items:center;gap:16px;margin-bottom:14px;position:fixed;top:0;left:50%;transform:translateX(-50%);width:calc(100% - 48px);max-width:1300px;height:var(--header-height);z-index:140;background:linear-gradient(180deg, rgba(11,13,16,0.96), rgba(11,13,16,0.92));backdrop-filter:blur(6px);padding:10px 20px;border-radius:10px}
29
+ .header-logo{width:50px;height:auto;flex-shrink:0}
29
30
  .repo-buttons{margin-left:auto;display:flex;gap:12px;align-items:center}
30
31
  .icon-btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;padding:10px 12px;border-radius:12px;color:var(--text);background:transparent;border:1px solid rgba(255,255,255,0.03);cursor:pointer;text-decoration:none;font-weight:700;transition:transform .08s ease,box-shadow .12s ease,background .12s ease;min-width:44px;min-height:44px}
31
32
  .icon-btn svg, .icon-btn .icon-svg{display:block;width:28px;height:28px}
@@ -1,24 +1,89 @@
1
- <svg width="512" height="512" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg">
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="60 40 392 432" width="512" height="512" aria-label="zero-http logo">
2
2
  <defs>
3
- <linearGradient id="grad" x1="0%" y1="0%" x2="100%" y2="100%">
4
- <stop offset="0%" stop-color="#00c6ff"></stop>
5
- <stop offset="100%" stop-color="#0072ff"></stop>
3
+ <!-- Primary purple-to-cyan gradient -->
4
+ <linearGradient id="logo-grad" x1="0" y1="0" x2="1" y2="1">
5
+ <stop offset="0%" stop-color="#7b61ff"/>
6
+ <stop offset="50%" stop-color="#5865f2"/>
7
+ <stop offset="100%" stop-color="#3ec6ff"/>
6
8
  </linearGradient>
9
+ <!-- Lighter glow version -->
10
+ <linearGradient id="logo-glow" x1="0" y1="0" x2="1" y2="1">
11
+ <stop offset="0%" stop-color="#a78bfa"/>
12
+ <stop offset="100%" stop-color="#67e8f9"/>
13
+ </linearGradient>
14
+ <!-- Subtle inner highlight -->
15
+ <linearGradient id="logo-hi" x1="0.5" y1="0" x2="0.5" y2="1">
16
+ <stop offset="0%" stop-color="rgba(255,255,255,0.25)"/>
17
+ <stop offset="100%" stop-color="rgba(255,255,255,0)"/>
18
+ </linearGradient>
19
+ <!-- Background radial glow -->
20
+ <radialGradient id="bg-glow" cx="50%" cy="50%" r="50%">
21
+ <stop offset="0%" stop-color="#5865f2" stop-opacity="0.12"/>
22
+ <stop offset="100%" stop-color="#0e1114" stop-opacity="0"/>
23
+ </radialGradient>
24
+ <!-- Drop shadow filter -->
25
+ <filter id="logo-shadow" x="-20%" y="-20%" width="140%" height="140%">
26
+ <feDropShadow dx="0" dy="4" stdDeviation="8" flood-color="#5865f2" flood-opacity="0.35"/>
27
+ </filter>
28
+ <!-- Soft glow filter -->
29
+ <filter id="bolt-glow" x="-30%" y="-30%" width="160%" height="160%">
30
+ <feGaussianBlur stdDeviation="4" result="blur"/>
31
+ <feComposite in="SourceGraphic" in2="blur" operator="over"/>
32
+ </filter>
7
33
  </defs>
8
34
 
9
- <rect width="512" height="512" rx="90" fill="#0f172a"></rect>
35
+ <!-- Background glow -->
36
+ <circle cx="256" cy="256" r="200" fill="url(#bg-glow)"/>
37
+
38
+ <!-- Outer ring — perfect circle -->
39
+ <circle cx="256" cy="256" r="195" fill="none"
40
+ stroke="url(#logo-grad)" stroke-width="24"
41
+ stroke-linecap="round" opacity="0.15"/>
42
+
43
+ <!-- Main ring — perfect circle -->
44
+ <circle cx="256" cy="256" r="170" fill="none"
45
+ stroke="url(#logo-grad)" stroke-width="32"
46
+ stroke-linecap="round" filter="url(#logo-shadow)"/>
10
47
 
11
- <circle cx="256" cy="230" r="110" fill="none" stroke="url(#grad)" stroke-width="28"></circle>
48
+ <!-- Highlight arc on top-left of the ring -->
49
+ <path d="M 140,175 A 170,170 0 0,1 330,100"
50
+ fill="none" stroke="url(#logo-hi)" stroke-width="14"
51
+ stroke-linecap="round" opacity="0.6"/>
12
52
 
13
- <line x1="256" y1="120" x2="256" y2="340" stroke="#0f172a" stroke-width="28"></line>
53
+ <!-- Lightning bolt centered and thicker -->
54
+ <g filter="url(#bolt-glow)">
55
+ <!-- Bolt body -->
56
+ <path d="
57
+ M 222 82
58
+ L 186 242
59
+ L 252 242
60
+ L 182 435
61
+ L 330 205
62
+ L 258 205
63
+ L 296 82
64
+ Z
65
+ " fill="url(#logo-grad)"/>
14
66
 
15
- <rect x="180" y="190" width="152" height="80" rx="16" fill="#0f172a"></rect>
67
+ <!-- Bolt inner highlight -->
68
+ <path d="
69
+ M 228 100
70
+ L 202 238
71
+ L 252 238
72
+ L 204 395
73
+ L 318 212
74
+ L 262 212
75
+ L 288 100
76
+ Z
77
+ " fill="url(#logo-hi)" opacity="0.5"/>
78
+ </g>
16
79
 
17
- <text x="256" y="245" text-anchor="middle" font-family="Segoe UI, Arial, sans-serif" font-size="42" font-weight="700" fill="url(#grad)">
18
- HTTP
19
- </text>
80
+ <!-- Small orbital dots representing HTTP connections -->
81
+ <circle cx="100" cy="155" r="8" fill="#7b61ff" opacity="0.7"/>
82
+ <circle cx="410" cy="360" r="8" fill="#3ec6ff" opacity="0.7"/>
83
+ <circle cx="88" cy="330" r="5" fill="#5865f2" opacity="0.5"/>
84
+ <circle cx="425" cy="170" r="5" fill="#67e8f9" opacity="0.5"/>
20
85
 
21
- <text x="256" y="430" text-anchor="middle" font-family="Segoe UI, Arial, sans-serif" font-size="44" font-weight="600" fill="white" letter-spacing="4">
22
- ZERO
23
- </text>
24
- </svg>
86
+ <!-- Subtle angled scan lines for tech feel -->
87
+ <line x1="120" y1="400" x2="160" y2="415" stroke="#3ec6ff" stroke-width="2" opacity="0.15" stroke-linecap="round"/>
88
+ <line x1="350" y1="95" x2="390" y2="110" stroke="#7b61ff" stroke-width="2" opacity="0.15" stroke-linecap="round"/>
89
+ </svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zero-http",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "Zero-dependency, minimal Express-like HTTP server and tiny fetch replacement",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -34,7 +34,7 @@
34
34
  "bugs": {
35
35
  "url": "https://github.com/tonywied17/zero-http-npm/issues"
36
36
  },
37
- "homepage": "https://zero-http.molex.cloud",
37
+ "homepage": "https://z-http.com",
38
38
  "engines": {
39
39
  "node": ">=14.0.0"
40
40
  },