feat(nexus): production modular HTTP/1.1 server + compiler fixes
- Rewrite apps/nexus with modular architecture: Config, Http, Errors, Parser, Router, Handlers, Server, Main - Use algebraic enums for ParseResult/FileResult/HttpError - Thread-pool server via Channel<ConnectionTask> and spawn - Fix C backend type ordering for generic struct instances (Array_T, Iter_T) and algebraic enum struct payloads - Collect Slice_T types from struct fields and enum payloads - Fix match lowering for simple enums (direct value compare) - Resolve match expression return type from first arm - Infer element type for for-in over Array<UserStruct> - Preserve generic type args in field access resolution - Add fflush to PrintLine/Print for immediate server logs - Add modern_features golden regression test - Regenerate golden expected.c files
This commit is contained in:
@@ -1,129 +1 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Nexus — Bux HTTP Server</title>
|
||||
<style>
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
background: #0d1117;
|
||||
color: #c9d1d9;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 2rem;
|
||||
}
|
||||
.card {
|
||||
background: #161b22;
|
||||
border: 1px solid #30363d;
|
||||
border-radius: 8px;
|
||||
padding: 3rem;
|
||||
max-width: 600px;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
h1 {
|
||||
font-size: 2.5rem;
|
||||
color: #58a6ff;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
.subtitle {
|
||||
color: #8b949e;
|
||||
font-size: 1.1rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
.features {
|
||||
text-align: left;
|
||||
margin: 2rem 0;
|
||||
}
|
||||
.features h3 {
|
||||
color: #58a6ff;
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
.features ul {
|
||||
list-style: none;
|
||||
}
|
||||
.features li {
|
||||
padding: 0.4rem 0;
|
||||
color: #8b949e;
|
||||
}
|
||||
.features li::before {
|
||||
content: "▸ ";
|
||||
color: #3fb950;
|
||||
}
|
||||
.endpoints {
|
||||
margin-top: 2rem;
|
||||
padding-top: 1.5rem;
|
||||
border-top: 1px solid #30363d;
|
||||
}
|
||||
.endpoints h3 {
|
||||
color: #d2a8ff;
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
.endpoint {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 0.3rem 0;
|
||||
font-family: 'SF Mono', 'Fira Code', monospace;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
.endpoint .method {
|
||||
color: #3fb950;
|
||||
font-weight: bold;
|
||||
min-width: 60px;
|
||||
}
|
||||
.endpoint .path {
|
||||
color: #c9d1d9;
|
||||
}
|
||||
.footer {
|
||||
margin-top: 2rem;
|
||||
padding-top: 1.5rem;
|
||||
border-top: 1px solid #30363d;
|
||||
color: #484f58;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="card">
|
||||
<h1>⚡ Nexus</h1>
|
||||
<p class="subtitle">High-performance HTTP Server — Built with Bux</p>
|
||||
|
||||
<div class="features">
|
||||
<h3>Features</h3>
|
||||
<ul>
|
||||
<li>HTTP/1.1 — Full request parsing & response building</li>
|
||||
<li>Multi-threaded — Configurable worker pool</li>
|
||||
<li>HTTP/2 Detection — Upgrade-aware</li>
|
||||
<li>WebSocket Upgrade — Handshake support</li>
|
||||
<li>Static File Serving — With MIME type detection</li>
|
||||
<li>JSON API Endpoints</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="endpoints">
|
||||
<h3>API Endpoints</h3>
|
||||
<div class="endpoint">
|
||||
<span class="method">GET</span>
|
||||
<span class="path">/api/health</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="method">GET</span>
|
||||
<span class="path">/api/info</span>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="method">GET</span>
|
||||
<span class="path">/ws</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
Nexus v0.1.0 · Bux Programming Language
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<html><body>Hello Nexus</body></html>
|
||||
|
||||
Reference in New Issue
Block a user