{"id":20253105,"url":"https://github.com/tomiwa-ot/java-web-server","last_synced_at":"2025-04-10T23:32:16.403Z","repository":{"id":40564754,"uuid":"451043836","full_name":"Tomiwa-Ot/java-web-server","owner":"Tomiwa-Ot","description":"Simple HTTP server written in Java","archived":false,"fork":false,"pushed_at":"2023-03-26T14:03:45.000Z","size":2304,"stargazers_count":7,"open_issues_count":6,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-03T11:55:23.451Z","etag":null,"topics":["blocking-queue","http-basic-auth","http-server","java","maven","multithreaded-server","producer-consumer","socket","webserver"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tomiwa-Ot.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":"2022-01-23T08:20:04.000Z","updated_at":"2025-01-19T10:22:37.000Z","dependencies_parsed_at":"2024-11-14T10:23:18.028Z","dependency_job_id":"87c0e435-f672-4939-a217-0c9343739537","html_url":"https://github.com/Tomiwa-Ot/java-web-server","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tomiwa-Ot%2Fjava-web-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tomiwa-Ot%2Fjava-web-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tomiwa-Ot%2Fjava-web-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tomiwa-Ot%2Fjava-web-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tomiwa-Ot","download_url":"https://codeload.github.com/Tomiwa-Ot/java-web-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248316027,"owners_count":21083368,"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":["blocking-queue","http-basic-auth","http-server","java","maven","multithreaded-server","producer-consumer","socket","webserver"],"created_at":"2024-11-14T10:21:25.386Z","updated_at":"2025-04-10T23:32:16.383Z","avatar_url":"https://github.com/Tomiwa-Ot.png","language":"Java","readme":"## Java Web Server\n\nA simple multithreaded HTTP server built with the Producer-Consumer design pattern and synchronised with blocking queues.\n\n### Features\n- Directory Listing\n- Basic HTTP Authentication\n- Logs all requests ```webserver.log```\n\n### Configuration\n\n#### Port\nThe default port used is 8080. It can be modified either by changing the port value in [properties.json](src/main/resources/properties.json) or supply it as an argument in the console.\n```console\njavac App.java\njava App \u003cport_number\u003e\n```\n#### Basic HTTP Authentication\nTo enable, change the username value from ```null``` to ```\u003cyour_username\u003e``` and password value from ```null``` to a Bcrypt hash of the password in [properties.json](src/main/resources/properties.json)\n```json\n{\n\t\"username\" : \"your_username\",\n\t\"password\" : \"Bcrypt hash\",\n}\n```\nTo disable, set the username and password values as ```null```.\n\n#### Worker Threads and Connection Queue\nThe number of consumer threads and blocking queue size can be modified in [properties.json](src/main/resources/properties.json)\n```json\n{\n\t\"worker_threads\" : 20,\n\t\"connection_queue\" : 30\n}\n```\n\n#### Screenshots\n![Index page](screenshots/screenshot01.png)\n![Viewing a file](screenshots/screenshot02.jpg)\n![BAsic HTTP authorization](screenshots/screenshot03.png)\n\n### TODO\n- Request for basic authentication if username \u0026 password are set\n- Allow user to specify web root folder\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomiwa-ot%2Fjava-web-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomiwa-ot%2Fjava-web-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomiwa-ot%2Fjava-web-server/lists"}