This markdown server is built with:
- Language: Rust
- Architecture: Multi-threaded with custom thread pool
- Protocol: HTTP/1.1
- Features: Markdown parsing, HTML generation, CSS styling
struct ThreadPool {
workers: Vec<Worker>,
sender: Option<mpsc::Sender<Job>>,
}The server uses a producer-consumer pattern with:
- Main thread accepts connections
- Worker threads process requests
- Channel-based job distribution
- H1, H2, H3 support
- Automatic styling with borders
- Bold text with
**text** - Italic text with
*text* Inline codewith backticks
Fenced code blocks with language support:
def hello_world():
print("Hello from Python!")function helloWorld() {
console.log("Hello from JavaScript!");
}- Bullet point lists
- Nested list support
- Automatic HTML conversion
The multi-threaded architecture allows:
- Concurrent request handling
- Scalable performance
- Efficient resource utilization