<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Crab HTTP - Lightweight Rust HTTP Server</title>
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
</head>
<body class="bg-gray-50 text-gray-800">
<header class="bg-white shadow">
<div class="max-w-7xl mx-auto px-6 py-4 flex justify-between items-center">
<h1 class="text-xl font-bold text-blue-600">Crab HTTP 🦀</h1>
<a href="https://github.com/arjav0703/http-server" target="_blank" class="text-blue-500 hover:text-blue-700 font-medium hover:underline">View on GitHub</a>
</div>
</header>
<section class="bg-gradient-to-br from-blue-100 to-white py-20">
<div class="max-w-4xl mx-auto text-center px-4">
<h2 class="text-4xl font-bold text-gray-900 mb-4">Fast, and Minimal HTTP Server written in Rust 🦀</h2>
<p class="text-lg text-gray-700 mb-6">
Crab HTTP is an open-source HTTP server built in Rust. Blazing fast, and designed for embedded and cloud-native systems.
</p>
<div class="flex gap-4 justify-center">
<a href="https://crates.io/crates/crab-http" class="bg-blue-600 text-white px-6 py-3 rounded shadow hover:bg-blue-700 transition hover:scale-110">
📦 Use Cargo
</a>
<a href="https://github.com/arjav0703/http-server/releases/latest" class="bg-blue-600 text-white px-6 py-3 rounded shadow hover:bg-blue-700 transition hover:scale-110">
⬇️ Standalone Binary
</a>
<a href="https://github.com/arjav0703/http-server" class="bg-blue-600 text-white px-6 py-3 rounded shadow hover:bg-blue-700 transition hover:scale-110">
🛠️ Build from source
</a>
<div/>
</div>
</section>
<section class="py-16 bg-white">
<div class="max-w-6xl mx-auto px-6">
<div>
<h3 class="text-3xl font-semibold text-gray-900 mb-12 text-center">Features</h3>
<div class="grid grid-cols-1 md:grid-cols-3 gap-10">
<div class="bg-gray-50 p-6 rounded-lg shadow-sm hover:shadow-md transition">
<h4 class="text-xl font-semibold mb-2 text-blue-600">Secure by Design</h4>
<p class="text-gray-700">Memory safety guaranteed by Rust. Includes basic protection against common attacks.</p>
</div>
<div class="bg-gray-50 p-6 rounded-lg shadow-sm hover:shadow-md transition">
<h4 class="text-xl font-semibold mb-2 text-blue-600">Embedded-Ready</h4>
<p class="text-gray-700">Lightweight enough to run on edge devices or single-board computers with limited resources.</p>
</div>
<div class="bg-gray-50 p-6 rounded-lg shadow-sm hover:shadow-md transition">
<h4 class="text-xl font-semibold mb-2 text-blue-600">Open Source</h4>
<p class="text-gray-700">Licensed under MIT. Actively maintained and open to community contributions.</p>
</div>
</div>
</div>
<div class="mt-16">
<h3 class="text-3xl font-semibold text-gray-900 mb-12 text-center">CLI usage</h3>
<ul class="text-lg text-gray-700 mb-6 mx-auto max-w-2xl">
<li><code>-d</code> - Specify the directory to serve files from.</li>
<li><code>-p</code> - Specify the port to listen on.</li>
<li><code>--allow-write</code> - Allow write permission via POST request.</li>
<li><code>-t</code> - Set timeout duration (in seconds).</li>
<li><code>--help</code> - Display help information.</li>
</ul>
</div>
<div class="mt-16">
<h3 class="text-3xl font-semibold text-gray-900 mb-12 text-center">Send request to the server</h3>
<ul class="text-lg text-gray-700 mb-6 mx-auto">
<li><code>curl --http1.1 https://httpserver.arjav.hackclub.app/echo/hello-world -H "Connection: close"</code> - Use the /echo route that returns the string specified in the route </li>
</ul>
</div>
</section>
<footer class="bg-gray-100 py-6 text-center text-sm text-gray-600">
<p>© 2025 Crab HTTP Project. Built with ❤️ in Rust 🦀.</p>
</footer>
</body>
</html>