{"id":15289018,"url":"https://github.com/stylet/nginx-plus-dynamic-upstream","last_synced_at":"2026-02-08T08:30:55.656Z","repository":{"id":36617312,"uuid":"229078853","full_name":"StyleT/nginx-plus-dynamic-upstream","owner":"StyleT","description":"Allows to register/unregister app in Nginx+","archived":false,"fork":false,"pushed_at":"2022-12-10T12:38:21.000Z","size":69,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-22T14:34:48.670Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/StyleT.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-19T15:05:48.000Z","updated_at":"2020-06-09T10:35:39.000Z","dependencies_parsed_at":"2023-01-17T03:09:45.764Z","dependency_job_id":null,"html_url":"https://github.com/StyleT/nginx-plus-dynamic-upstream","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StyleT%2Fnginx-plus-dynamic-upstream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StyleT%2Fnginx-plus-dynamic-upstream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StyleT%2Fnginx-plus-dynamic-upstream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StyleT%2Fnginx-plus-dynamic-upstream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StyleT","download_url":"https://codeload.github.com/StyleT/nginx-plus-dynamic-upstream/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245217791,"owners_count":20579297,"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":"2024-09-30T15:55:35.319Z","updated_at":"2026-02-08T08:30:55.599Z","avatar_url":"https://github.com/StyleT.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nginx-plus-dynamic-upstream\n\nThis library allows to register/unregister app in Nginx+\n\n## Usage example\n\n```javascript\nconst nginxReg = new (require('nginx-plus-dynamic-upstream'))({ /* ... */ }, console);\nconst http     = require('http');\n\nconst server = http.createServer();\nserver.on('listening', () =\u003e {\n   const addr = server.address();\n   const bind = typeof addr === 'string' ? 'pipe ' + addr : 'port ' + addr.port;\n   global.console.log('Listening on ' + bind);\n\n   nginxReg.initHandler().catch(err =\u003e {\n       console.error('Error happened during registration in Nginx. Ending execution...');\n       console.error(err);\n       process.exit(1);\n   })\n});\n\nprocess.on('SIGTERM', () =\u003e exitHandler());\nprocess.on('SIGINT', () =\u003e exitHandler());\nprocess.on('exit', () =\u003e exitHandler());\n\nfunction exitHandler() {\n    console.log('Shutting down HTTP server...');\n\n    nginxReg.exitHandler().then(() =\u003e {\n        server.close();\n        process.exit(0);\n    }).catch(err =\u003e {\n        console.error('Error happened during unregistration in Nginx. Ending execution...');\n        console.error(err);\n        process.exit(1);\n    });\n}\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstylet%2Fnginx-plus-dynamic-upstream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstylet%2Fnginx-plus-dynamic-upstream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstylet%2Fnginx-plus-dynamic-upstream/lists"}