-
-
Notifications
You must be signed in to change notification settings - Fork 23
Home
akshat k edited this page Dec 26, 2024
·
5 revisions
- Server Class - Main server implementation wiki/server.md or server/index.js
- Response Class - Handles HTTP response formatting wiki/server/response.md or server/response.js
- HTTP Parser - Custom HTTP request parsing implementation wiki/lib/httpParser.md or lib/httpParser.js
- Socket Handler - TCP socket management
Located in wiki/lib/mimeDB.md
- Handles file type detection
- Maps file extensions to MIME types
- Used for proper Content-Type header setting
Located in wiki/lib/utils.md
- HTTP body parsing
- Query parameter parsing
- MIME type lookups
- String manipulation utilities
- Custom implementation without dependencies
- Handles both GET and POST requests
- Parses headers, query parameters, and body content
- Supports JSON parsing
- Chainable response methods
- Supports multiple response types (JSON, files, text)
- Automatic MIME type detection for file responses
- Built-in error handling
- Support for multiple HTTP methods (GET, POST, PUT, DELETE, PATCH, etc.)
- Path parameter extraction
- Query string parsing
- Route handler management
- Maintain zero-dependency philosophy
- Follow existing code structure
- Add appropriate documentation
- Include test cases
- Unit tests for core components
- Integration tests for request/response cycle
- Performance benchmarks
- TCP socket optimization
- Memory management
- Request parsing efficiency
- Response streaming
- Built-in CORS support
- Header sanitization
- Request validation
- Error handling security
This project is licensed under GOFL (Global Opensource softwares Free License) - see the LICENSE file for details.