How schiavoanto/hows works
Main Components
a) Core Server Component:
• HTTP Listener/Server (derived from Program.cs)
• Configuration Manager (represented by Config.cs)
• Utility Functions (represented by Utils.cs)
b) Resource Management:
• Static Resource Handler (for the Resources directory)
• Directory Listing Component
• Error Handler
c) File System Interface:
• Root Directory Handler
• Custom 404 Pages Manager
• Directory Content Listing Service
┌─────────────────────────────────────────┐
• Client Layer │
• ┘
• ↕
┌─────────────────────────────────────────┐
• HTTP Server Layer │
• ┤
• Configuration Manager │
• ┤
• Request Processor │
• ┘
• ↕
┌─────────────────────────────────────────┐
• Resource Management Layer │
• ┤
• Directory │ Error │ File │
• Listing │ Handling │ Server│
• ┘
• ↕
┌─────────────────────────────────────────┐
• File System Interface │
• ┘
Key Relationships to Highlight
a) Request Flow:
• Client → HTTP Server → Request Processor → Resource Management → File System
• Error handling paths
• Directory listing generation
b) Configuration Flow:
• Config.cs interaction with all components
• JSON configuration file reading path
Implementation Details
• .NET 8.0 runtime environment
• Resource template files (dirlist.html, error.html)
• JSON configuration input
• File serving capabilities