{"id":26911190,"url":"https://github.com/mathsgod/light-server","last_synced_at":"2026-02-16T21:33:08.210Z","repository":{"id":283009741,"uuid":"950388884","full_name":"mathsgod/light-server","owner":"mathsgod","description":null,"archived":false,"fork":false,"pushed_at":"2025-12-31T07:27:29.000Z","size":43,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-02T22:15:30.825Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/mathsgod.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-18T04:49:53.000Z","updated_at":"2025-12-30T09:33:10.000Z","dependencies_parsed_at":"2025-04-15T05:24:18.236Z","dependency_job_id":"e5a05146-b076-4226-a73e-ac756e727a91","html_url":"https://github.com/mathsgod/light-server","commit_stats":null,"previous_names":["mathsgod/light-server"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/mathsgod/light-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathsgod%2Flight-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathsgod%2Flight-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathsgod%2Flight-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathsgod%2Flight-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mathsgod","download_url":"https://codeload.github.com/mathsgod/light-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathsgod%2Flight-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29519380,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T18:37:19.720Z","status":"ssl_error","status_checked_at":"2026-02-16T18:36:46.920Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2025-04-01T14:37:00.452Z","updated_at":"2026-02-16T21:33:08.202Z","avatar_url":"https://github.com/mathsgod.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Light Server\n\nA lightweight PHP web framework with a simple file-based routing convention.\n\n## Features\n\n- 🚀 Lightweight design and fast startup\n- 📄 File-system based routing\n- 🛠️ PSR-7 standard support\n- 💪 Built-in middleware system\n- 🔄 Simple HTTP method handling (GET, POST, etc.)\n\n## Installation\n\nInstall via Composer:\n\n```bash\ncomposer require mathsgod/light-server\n```\n\n## Quick Start\n\n### Basic Setup\n\n1. Create a `pages` folder in your project root\n2. Create a `pages/index.php` file\n\n### Starting the Server\n\n```php\n\u003c?php\n\nrequire 'vendor/autoload.php';\n\n(new Light\\Server())-\u003erun();\n```\n\n## Usage\n\n### Simple Example\n\nIn `pages/index.php`:\n\n```php\n\u003c?php\n\nuse Laminas\\Diactoros\\Response\\TextResponse;\n\nreturn new class() {\n    \n    public function get()\n    {\n        return new TextResponse(\"Hello World\");\n    }\n\n    public function post()\n    {\n        return new TextResponse(\"POST request received\");\n    }\n};\n```\n\n### Routing Structure\n\nThe page system automatically generates routes based on the file structure:\n\n- `pages/index.php` → `/`\n- `pages/about.php` → `/about`\n- `pages/blog/index.php` → `/blog`\n- `pages/blog/{id}/index.php` → `/blog/{id}` (dynamic routes)\n\n### Handling HTTP Methods\n\nDefine corresponding methods in your page class:\n\n```php\npublic function get() { }      // GET request\npublic function post() { }     // POST request\npublic function put() { }      // PUT request\npublic function delete() { }   // DELETE request\npublic function patch() { }    // PATCH request\n```\n\n## License\n\nSee the LICENSE file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathsgod%2Flight-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathsgod%2Flight-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathsgod%2Flight-server/lists"}