{"id":18543289,"url":"https://github.com/fastuptime/star-route-proxy","last_synced_at":"2025-05-15T05:10:45.231Z","repository":{"id":228634835,"uuid":"774427111","full_name":"fastuptime/star-route-proxy","owner":"fastuptime","description":"Star Route Proxy is a Node.js module used to route incoming requests to different destinations. This module directs requests from one domain to a specific target while routing requests from other domains to different targets.","archived":false,"fork":false,"pushed_at":"2024-03-19T14:33:17.000Z","size":3,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-19T16:19:26.794Z","etag":null,"topics":["reverse-proxy","start","start-route-proxy"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/star-route-proxy","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fastuptime.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-03-19T14:31:14.000Z","updated_at":"2024-03-19T14:34:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"f907a82b-0d86-4b67-a3ee-5f56d0023d6a","html_url":"https://github.com/fastuptime/star-route-proxy","commit_stats":null,"previous_names":["fastuptime/star-route-proxy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastuptime%2Fstar-route-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastuptime%2Fstar-route-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastuptime%2Fstar-route-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastuptime%2Fstar-route-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fastuptime","download_url":"https://codeload.github.com/fastuptime/star-route-proxy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254276473,"owners_count":22043869,"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":["reverse-proxy","start","start-route-proxy"],"created_at":"2024-11-06T20:13:20.695Z","updated_at":"2025-05-15T05:10:45.198Z","avatar_url":"https://github.com/fastuptime.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Star Route Proxy 🌟\n\nStar Route Proxy is a Node.js module used to route incoming requests to different destinations. This module directs requests from one domain to a specific target while routing requests from other domains to different targets.\n\n## Installation\n\nYou can add the Star Route Proxy module to your project using npm or yarn:\n\n```bash\nnpm install star-route-proxy\n```\n\nor\n\n```bash\nyarn add star-route-proxy\n```\n\n## Usage\n\n```javascript\nconst StarRouteProxy = require('star-route-proxy');\n\n// Routing configurations\nconst routes = [\n    { domain: 'example.com', target: 'http://localhost:3000' },\n    { domain: 'api.example.com', target: 'http://localhost:4000' },\n    // You can add more routing configurations\n];\n\n// Create an instance of StarRouteProxy\nconst proxy = new StarRouteProxy(routes);\n\n// Listening for error and log events\nproxy.on('error', (error) =\u003e {\n    console.error('Error:', error);\n});\n\nproxy.on('log', (log) =\u003e {\n    console.log('Log:', log);\n});\n\n// Listening on a specified port for the proxy\nconst PORT = 8080;\nproxy.listen(PORT, () =\u003e {\n    console.log(`Star Route Proxy is running. Port: ${PORT}`);\n});\n```\n\n## Features\n\n- Routes incoming requests to specified targets.\n- Allows routing requests from different domains to different targets.\n- Shows custom error pages when target or domain is not found.\n\n## Logging and Error Handling\n\nStar Route Proxy provides logging and error handling by listening to 'log' and 'error' events. Below is an example of how to listen to these events:\n\n```javascript\n// Listening for error and log events\nproxy.on('error', (error) =\u003e {\n    console.error('Error:', error);\n});\n\nproxy.on('log', (log) =\u003e {\n    console.log('Log:', log);\n});\n```\n\n## Contributing\n\nContributions of any kind are welcome! If you have any questions or feedback regarding the project, feel free to submit them on [GitHub](https://github.com/your-username/star-route-proxy).\n\n## License\n\nThis project is licensed under the MIT License. For details, see the [LICENSE](LICENSE) file.\n\n---","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastuptime%2Fstar-route-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffastuptime%2Fstar-route-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastuptime%2Fstar-route-proxy/lists"}