<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Statico Webserver - File Response Example</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
line-height: 1.6;
max-width: 800px;
margin: 0 auto;
padding: 20px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
min-height: 100vh;
}
.container {
background: rgba(255, 255, 255, 0.1);
padding: 30px;
border-radius: 15px;
backdrop-filter: blur(10px);
box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}
h1 {
text-align: center;
margin-bottom: 30px;
font-size: 2.5em;
text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}
.feature-list {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 20px;
margin: 30px 0;
}
.feature {
background: rgba(255, 255, 255, 0.1);
padding: 20px;
border-radius: 10px;
border: 1px solid rgba(255, 255, 255, 0.2);
}
.feature h3 {
margin-top: 0;
color: #fff;
}
.stats {
display: flex;
justify-content: space-around;
margin: 30px 0;
flex-wrap: wrap;
}
.stat {
text-align: center;
padding: 15px;
}
.stat-number {
font-size: 2em;
font-weight: bold;
display: block;
}
.footer {
text-align: center;
margin-top: 40px;
opacity: 0.8;
}
.code {
background: rgba(0, 0, 0, 0.3);
padding: 15px;
border-radius: 8px;
font-family: 'Monaco', 'Menlo', monospace;
margin: 20px 0;
overflow-x: auto;
}
</style>
</head>
<body>
<div class="container">
<h1></h1>🚀 Statico Webserver</h1>
<p></p><strong>Success!</strong> This HTML page was loaded from a file using the <code>@filename</code> syntax.</p>
<div class="feature-list">
<div class="feature">
<h3>🔄 Multi-threaded</h3>
<p>Configurable number of worker threads with SO_REUSEPORT load balancing</p>
</div>
<div class="feature">
<h3>⚡ High Performance</h3>
<p>Single-thread Tokio runtime per worker for optimal performance</p>
</div>
<div class="feature">
<h3>📁 File Responses</h3>
<p>Load response bodies from files using the @ prefix</p>
</div>
<div class="feature">
<h3></h3>🔧 Customizable</h3>
<p>Custom status codes, headers, and response content</p>
</div>
<div class="feature">
<h3>🐧 io_uring Support</h3>
<p>Optional io_uring support for maximum I/O performance on Linux</p>
</div>
<div class="feature">
<h3>🌐 Cross-platform</h3>
<p>Works on Linux, macOS, Windows, and other Unix-like systems</p>
</div>
</div>
<h2>Usage Examples</h2>
<div class="code">
# Serve this HTML file<br>
./target/release/statico --body @example_page.html --header "Content-Type: text/html"
</div>
<div class="code">
# Serve JSON from file<br>
./target/release/statico --body @example_response.json --header "Content-Type: application/json"
</div>
<div class="stats">
<div class="stat">
<span class="stat-number">⚡</span>
High Performance
</div>
<div class="stat">
<span class="stat-number">🔄</span>
Load Balanced
</div>
<div class="stat">
<span class="stat-number">📁</span>
File Support
</div>
<div class="stat">
<span class="stat-number">🐧</span>
io_uring Ready
</div>
</div>
<div class="footer">
<p>Generated by Statico - A simple, high-performance HTTP webserver written in Rust</p>
<p>Request served at: <span id="timestamp"></span></p>
</div>
</div>
<script>
document.getElementById('timestamp').textContent = new Date().toISOString();
</script>
</body>
</html>