{"id":25170207,"url":"https://github.com/timonf/miniurl","last_synced_at":"2025-07-17T18:31:34.576Z","repository":{"id":199884321,"uuid":"704007174","full_name":"timonf/miniurl","owner":"timonf","description":"Most simple URL resolver.","archived":false,"fork":false,"pushed_at":"2023-10-12T11:04:27.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T20:31:27.356Z","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/timonf.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}},"created_at":"2023-10-12T10:50:47.000Z","updated_at":"2023-10-12T10:52:12.000Z","dependencies_parsed_at":"2023-10-13T05:52:08.655Z","dependency_job_id":"64fd23d3-92d5-43ca-afba-8cc9c223cab5","html_url":"https://github.com/timonf/miniurl","commit_stats":null,"previous_names":["timonf/miniurl"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/timonf/miniurl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timonf%2Fminiurl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timonf%2Fminiurl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timonf%2Fminiurl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timonf%2Fminiurl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timonf","download_url":"https://codeload.github.com/timonf/miniurl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timonf%2Fminiurl/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265645360,"owners_count":23804183,"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":[],"created_at":"2025-02-09T08:39:59.641Z","updated_at":"2025-07-17T18:31:34.551Z","avatar_url":"https://github.com/timonf.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"MiniURL\n=======\n\nMost simple URL resolver. Written in PHP. Works without database.\n\n\nInstallation\n------------\n\n1. `composer install --no-dev`\n2. `cp config.example.php config.php`\n3. `php -S localhost:8080 -t .`\n\n\nConfiguration\n-------------\n\nYou can add, edit and change the order of given resolvers.\n\n```php\n\u003c?php\n\ndeclare(strict_types=1);\n\nreturn [\n    // LinkListResolver will match URL according to an associative JSON array.\n    new MiniUrl\\Resolver\\LinkListResolver(__DIR__ . '/links.example.json'),\n    \n    // SingleLinkResolver will match a simple URL (`http://localhost:8080/test` redirects to `https://www.example.com`).\n    new MiniUrl\\Resolver\\SingleLinkResolver('test', 'https://www.example.com'),\n    \n    // RegExResolver is useful to extract certain parts and use it in target URL.\n    new MiniUrl\\Resolver\\RegExResolver('/^search\\/([\\w\\d\\s]+)$/', 'https://duckduckgo.com/?q=$1'),\n    \n    // Keep this line as last entry to return a simple 404 page as a fallback.\n    new MiniUrl\\Resolver\\NotFoundResolver(), \n];\n```\n\n\nTesting\n-------\n\n1. `composer install`\n2. `composer run tests`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimonf%2Fminiurl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimonf%2Fminiurl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimonf%2Fminiurl/lists"}