{"id":26057595,"url":"https://github.com/basemax/nginx-forwarding-script","last_synced_at":"2026-04-14T03:31:46.805Z","repository":{"id":281225512,"uuid":"938144003","full_name":"BaseMax/nginx-forwarding-script","owner":"BaseMax","description":"A simple Node.js script for generating and managing Nginx forwarding configurations dynamically.","archived":false,"fork":false,"pushed_at":"2025-03-07T13:55:40.000Z","size":21,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-07T17:47:06.781Z","etag":null,"topics":["bun","javascript","js","microservice","microservices","nginx","nginx-proxy","nginx-proxy-manager","nginx-reverse-proxy","nginx-reverse-proxy-manager","nginx-reverseproxy","node","ts","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/BaseMax.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":"2025-02-24T13:46:33.000Z","updated_at":"2025-03-07T14:01:35.000Z","dependencies_parsed_at":"2025-03-07T17:47:09.401Z","dependency_job_id":"96e08e9e-b019-473d-85eb-e0a22db01564","html_url":"https://github.com/BaseMax/nginx-forwarding-script","commit_stats":null,"previous_names":["basemax/nginx-forwarding-script"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2Fnginx-forwarding-script","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2Fnginx-forwarding-script/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2Fnginx-forwarding-script/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2Fnginx-forwarding-script/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BaseMax","download_url":"https://codeload.github.com/BaseMax/nginx-forwarding-script/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242546022,"owners_count":20147096,"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":["bun","javascript","js","microservice","microservices","nginx","nginx-proxy","nginx-proxy-manager","nginx-reverse-proxy","nginx-reverse-proxy-manager","nginx-reverseproxy","node","ts","typescript"],"created_at":"2025-03-08T11:49:47.590Z","updated_at":"2025-12-24T03:46:11.653Z","avatar_url":"https://github.com/BaseMax.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nginx Forwarding Script\n\nA simple Node.js script for generating and managing Nginx forwarding configurations dynamically.\n\n## Features\n\n- Automatically generates Nginx configuration files based on predefined routes.\n- Supports multiple ports and route-based forwarding.\n- Includes Cross-Origin Resource Sharing (CORS) headers.\n- Manages existing configurations by overwriting outdated files.\n\n## Installation\n\n### Prerequisites\n\n- Node.js (Latest LTS recommended)\n- Nginx installed and configured on your system\n\n### Clone the Repository\n\n```sh\ngit clone https://github.com/BaseMax/nginx-forwarding-script.git\ncd nginx-forwarding-script\n```\n\n### Install Dependencies\n\n```sh\nbun install\n```\n\n## Usage\n\n### Configuration\n\nModify `src/configRoutes.ts` to define your forwarding rules. Example:\n\n```ts\nexport const config: { ports: PortConfig[] } = {\n    ports: [\n        {\n            port: 9004,\n            gateway: '127.0.0.1:2004',\n            routes: [\n                { method: 'POST', path: '/v1/member/register', target: '127.0.0.1:30031' },\n                { method: 'POST', path: '/v1/login', target: '127.0.0.1:30031' }\n            ]\n        }\n    ]\n};\n```\n\n### Run the Script\n\n```sh\nbun run update\nbun run reload\nbun run restart\n```\n\nThis will generate the Nginx configuration files in the specified path and apply the forwarding rules.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Copyright\n\n\u0026copy; 2025 Max Base.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasemax%2Fnginx-forwarding-script","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasemax%2Fnginx-forwarding-script","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasemax%2Fnginx-forwarding-script/lists"}