{"id":20505495,"url":"https://github.com/zdliuccit/zg-door","last_synced_at":"2026-03-19T16:08:51.154Z","repository":{"id":42101481,"uuid":"201836816","full_name":"zdliuccit/zg-door","owner":"zdliuccit","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-13T23:40:38.000Z","size":3527,"stargazers_count":0,"open_issues_count":27,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-05T21:25:08.341Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Vue","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/zdliuccit.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}},"created_at":"2019-08-12T01:34:52.000Z","updated_at":"2019-10-07T07:18:21.000Z","dependencies_parsed_at":"2023-02-09T17:45:30.722Z","dependency_job_id":null,"html_url":"https://github.com/zdliuccit/zg-door","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zdliuccit/zg-door","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdliuccit%2Fzg-door","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdliuccit%2Fzg-door/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdliuccit%2Fzg-door/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdliuccit%2Fzg-door/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zdliuccit","download_url":"https://codeload.github.com/zdliuccit/zg-door/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdliuccit%2Fzg-door/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274996690,"owners_count":25387926,"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","status":"online","status_checked_at":"2025-09-13T02:00:10.085Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11-15T19:47:21.082Z","updated_at":"2026-02-15T17:07:47.214Z","avatar_url":"https://github.com/zdliuccit.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zg-door\n\n## Project setup\n```\nnpm install\n```\n\n### Compiles and hot-reloads for development\n```\nnpm run dev\n```\n\n### Compiles and minifies for production\n```\nnpm start\n```\n\n构建生产代码\n```npm\nnpm run build 构建生产代码\n\n```\npm2启动服务\n```npm\n初次启动\npm2 start pm2.config.js --env production # production 对应 env_production\nor\npm2 start ml-app\n```\npm2的用法和参数说明可以参考[pm2.md](./pm2.md)，也可参考[PM2实用入门指南](http://www.cnblogs.com/chyingp/p/pm2-documentation.html)\n\n### Nginx\n在pm2基础上，Nginx配置upstream实现负载均衡\n\n#### 在http节点下，加入upstream节点。\n```bash\nupstream server_name {\n  server  172.16.119.198:8018 max_fails=2 fail_timeout=30s;\n  server  172.16.119.198:8019 max_fails=2 fail_timeout=30s;\n  server  172.16.119.198:8020 max_fails=2 fail_timeout=30s;\n  .....\n}\n```\n#### 将server节点下的location节点中的proxy_pass配置为：http:// + server_name，即“ http://server_name”.\n```bash\nlocation / {\n  proxy_pass http://server_name;\n  proxy_set_header Host localhost;\n  proxy_set_header X-Forwarded-For $remote_addr\n}\n```\n详细配置参考文档\n\n如果应用服务是域名子路径`ssr`的话，需要注意如下\n* location除了需要设置匹配`/ssr`规则之外，还需设置接口、资源的前缀比如(/api,/dist) `location ~ /(ssr|api|dist) {...}`\n* vue的路由也该设置`base:'/ssr'`\n* `entry-server.js`里`router.push(url)`这里，url应该把`/ssr`去掉，即`router.push(url.replace('/ssr','''))`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzdliuccit%2Fzg-door","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzdliuccit%2Fzg-door","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzdliuccit%2Fzg-door/lists"}