{"id":28312867,"url":"https://github.com/moheladwy/simple-http-server","last_synced_at":"2026-03-04T03:01:41.137Z","repository":{"id":295144367,"uuid":"989308592","full_name":"moheladwy/Simple-HTTP-Server","owner":"moheladwy","description":"A lightweight HTTP server implementation in C that demonstrates fundamental web server functionality. This project serves static files and handles basic HTTP requests.","archived":false,"fork":false,"pushed_at":"2025-05-24T00:52:33.000Z","size":21,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-18T02:42:44.543Z","etag":null,"topics":["c","http","http-requests","http-server","web","web-server","websocket"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moheladwy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-23T21:08:52.000Z","updated_at":"2025-05-24T00:57:35.000Z","dependencies_parsed_at":"2025-05-26T09:35:23.973Z","dependency_job_id":null,"html_url":"https://github.com/moheladwy/Simple-HTTP-Server","commit_stats":null,"previous_names":["moheladwy/simple-http-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/moheladwy/Simple-HTTP-Server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moheladwy%2FSimple-HTTP-Server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moheladwy%2FSimple-HTTP-Server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moheladwy%2FSimple-HTTP-Server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moheladwy%2FSimple-HTTP-Server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moheladwy","download_url":"https://codeload.github.com/moheladwy/Simple-HTTP-Server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moheladwy%2FSimple-HTTP-Server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30070479,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T01:03:42.280Z","status":"online","status_checked_at":"2026-03-04T02:00:07.464Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","http","http-requests","http-server","web","web-server","websocket"],"created_at":"2025-05-24T18:09:45.706Z","updated_at":"2026-03-04T03:01:41.133Z","avatar_url":"https://github.com/moheladwy.png","language":"C","readme":"# Simple HTTP Server\n\nA lightweight HTTP server implementation in C that demonstrates fundamental web server functionality. This project serves static files and handles basic HTTP requests.\n\n## Features\n\n- Serves static files from the filesystem\n- Proper MIME type detection based on file extensions\n- Standard HTTP status codes and responses\n- Minimalist and educational codebase\n\n## Project Structure\n\n- `server.c` - Main server implementation\n- `utils.h/utils.c` - Utility functions for file operations and content type handling\n- `status_codes.h/status_codes.c` - HTTP status codes implementation\n- `Makefile` - Build configuration\n\n## Requirements\n\n- GCC compiler\n- POSIX-compliant operating system (Linux, macOS, etc.)\n\n## Building and Running\n\n### Build the server\n\n```bash\nmake build\n```\n\n### Run the server\n\n```bash\nmake run\n```\n\n### Clean build files\n\n```bash\nmake clean\n```\n\n## Docker Support\n\n### Build the Docker image\n\n```bash\ndocker build -t simple-http-server .\n```\n\n### Run the server in a container\n\n```bash\ndocker run -p 8080:8080 --name simple-http-server simple-http-server\n```\n\nThis maps port 8080 from the container to port 8080 on your host machine.\n\n## Usage\n\n1. Start the server using `make run`\n2. Navigate to \u003chttp://localhost:8080/index.html\u003e in your web browser\n   - Replace `index.html` with any file in the server directory you want to access\n\n## How It Works\n\n1. The server creates a socket and binds it to port 8080\n2. Listens for incoming HTTP requests\n3. Parses the request to determine which file is being requested\n4. Checks if the file exists and sends appropriate status code\n5. Determines the content type based on file extension\n6. Sends the file content to the client with proper HTTP headers\n\n## Limitations\n\nThis is a simple demonstration server intended for educational purposes. It doesn't support:\n\n- Multiple concurrent connections\n- HTTP methods other than GET\n- Dynamic content generation\n- Security features\n\n## License\n\nThis project is open source and available for educational purposes.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoheladwy%2Fsimple-http-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoheladwy%2Fsimple-http-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoheladwy%2Fsimple-http-server/lists"}