{"id":19577123,"url":"https://github.com/shjhe/node-nginx","last_synced_at":"2025-04-27T06:32:02.025Z","repository":{"id":65458209,"uuid":"120422198","full_name":"shjhe/node-nginx","owner":"shjhe","description":"使用Node快速启动、关闭、重启（更新配置文件）","archived":false,"fork":false,"pushed_at":"2018-09-01T10:47:04.000Z","size":13,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-09-07T03:35:00.237Z","etag":null,"topics":["nginx","nodejs","shell","windows"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/shjhe.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}},"created_at":"2018-02-06T08:10:01.000Z","updated_at":"2020-11-13T06:08:36.000Z","dependencies_parsed_at":"2023-01-24T13:15:32.474Z","dependency_job_id":null,"html_url":"https://github.com/shjhe/node-nginx","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shjhe%2Fnode-nginx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shjhe%2Fnode-nginx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shjhe%2Fnode-nginx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shjhe%2Fnode-nginx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shjhe","download_url":"https://codeload.github.com/shjhe/node-nginx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224059242,"owners_count":17248762,"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":["nginx","nodejs","shell","windows"],"created_at":"2024-11-11T07:04:38.036Z","updated_at":"2024-11-11T07:04:38.935Z","avatar_url":"https://github.com/shjhe.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-nginx \n    \n## 安装\n``` sh\nnpm install -g nginx-in-node\n# or\nyarn global add nginx-in-node\n```\n\n## 使用\n### 参数\n```sh\nnode-nginx [-s] [stop/reload/quit] [-f] [configPath]\n```\n1. -s使用nginx默认的命令，含有stop/reload/quit\n2. -f为自定义选择配置文件\n\u003e 本人的项目中，由于每个人都需要共用配置文件并使用独立的nginx去开发，因此添加此参数，选择是否使用最新的配置文件其启动nginx，也方便对nginx配置文件进行版本控制\n\n\n### 常用命令\n1. 常规启动\n\u003e 启动之前会先关闭已有的所有nginx进程，因此此命令也可为重启命令\n```sh\nnode-nginx [-f configPath]\n```\n\n2. 重启\n```sh\nnode-nginx -s reload [-f configPath]\n```\n\n3. 停止\n```sh\nnode-nginx -s stop [-f configPath]\n```\n\n### 其他配置\n1. 下载windows版nginx [http://nginx.org/en/download.html](http://nginx.org/en/download.html)\n2. 配置nginx环境变量，目录级别到nginx.exe即可（重要）\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshjhe%2Fnode-nginx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshjhe%2Fnode-nginx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshjhe%2Fnode-nginx/lists"}