{"id":23458041,"url":"https://github.com/ym496/web-server","last_synced_at":"2025-04-11T13:54:25.038Z","repository":{"id":267824178,"uuid":"902452078","full_name":"ym496/web-server","owner":"ym496","description":"A minimal multi-threaded http server from scratch in java.","archived":false,"fork":false,"pushed_at":"2024-12-13T03:22:29.000Z","size":567,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T23:22:38.491Z","etag":null,"topics":["java","network-programming","socket-programming","web-server"],"latest_commit_sha":null,"homepage":"","language":"Java","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/ym496.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}},"created_at":"2024-12-12T15:39:13.000Z","updated_at":"2024-12-18T17:19:19.000Z","dependencies_parsed_at":"2024-12-12T17:36:29.439Z","dependency_job_id":"fe5e8230-2684-4080-b591-30a247a87ade","html_url":"https://github.com/ym496/web-server","commit_stats":null,"previous_names":["ym496/web-server"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ym496%2Fweb-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ym496%2Fweb-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ym496%2Fweb-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ym496%2Fweb-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ym496","download_url":"https://codeload.github.com/ym496/web-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248412111,"owners_count":21099050,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["java","network-programming","socket-programming","web-server"],"created_at":"2024-12-24T05:15:27.933Z","updated_at":"2025-04-11T13:54:25.014Z","avatar_url":"https://github.com/ym496.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# minimal http server in java\nThis is a lightweight multi-threaded HTTP server built from scratch using Java. It can handle GET, POST, and other HTTP requests asynchronously. It supports HTTP methods and serves files from a specified directory. It can process multiple requests at the same time by leveraging Java’s threading mechanism. I created this to understand how HTTP servers work.\n\n## demo\n* serves files with different MIME type from a specified dir\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"https://i.imgur.com/GfdiNUL.png\" alt=\"web server demo\" width=\"600\" /\u003e \u003c/centre\u003e\n\u003c/div\u003e\n\n* http method POST example\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"https://i.imgur.com/UBxRx3v.png\" alt=\"web server demo\" width=\"600\" /\u003e \u003c/centre\u003e\n\u003c/div\u003e\n\n*  this server uses Java threads to handle client requests concurrently. Each client request is processed in its own thread, ensuring non-blocking, simultaneous processing of multiple requests.\n## Installation\n\n1. Clone this repo:\n   ```bash\n   git clone git@github.com:ym496/web-server.git\n   cd web-server\n   ```\n2. Compile the server:\n   ```bash\n   javac Server.java\n   ```\n3. Run the server:\n   ```bash\n   java Server\n   ```\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fym496%2Fweb-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fym496%2Fweb-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fym496%2Fweb-server/lists"}