{"id":23843594,"url":"https://github.com/goodcoder666/gartic","last_synced_at":"2025-09-07T19:31:54.780Z","repository":{"id":270538194,"uuid":"853943494","full_name":"GoodCoder666/gartic","owner":"GoodCoder666","description":"你画我猜游戏","archived":false,"fork":false,"pushed_at":"2025-01-01T04:48:53.000Z","size":13,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-01T05:30:00.222Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GoodCoder666.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-08T01:06:49.000Z","updated_at":"2025-01-01T04:48:56.000Z","dependencies_parsed_at":"2025-01-01T05:30:12.216Z","dependency_job_id":"576f8d22-50b5-4d58-b8f1-ec6821d09412","html_url":"https://github.com/GoodCoder666/gartic","commit_stats":null,"previous_names":["goodcoder666/gartic"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoodCoder666%2Fgartic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoodCoder666%2Fgartic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoodCoder666%2Fgartic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoodCoder666%2Fgartic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GoodCoder666","download_url":"https://codeload.github.com/GoodCoder666/gartic/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232250733,"owners_count":18494772,"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":"2025-01-02T19:49:29.627Z","updated_at":"2025-01-02T19:49:30.389Z","avatar_url":"https://github.com/GoodCoder666.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gartic\n\n简单的你画我猜游戏。inspired by gartic.io\n\n## 设置 WebSocket 服务器\n\n假设你位于项目根目录下：\n\n### 切换目录\n\n```bash\ncd server\n```\n\n### 创建虚拟环境\n\n#### Windows\n\n```cmd\npython -m venv venv\ncall venv/scripts/activate.bat\n```\n\n#### Linux\n\n```bash\npython3 -m venv venv\nsource venv/bin/activate\n```\n\n### 安装依赖项\n\n```bash\npip install -r requirements.txt\n```\n\n### 启动服务器\n\n启动前先确定两个参数：\n\n- 服务器的局域网地址 `addr`（如 `192.168.0.1`），可以用 `ipconfig` 或 `ifconfig` 命令找到。\n- 词库文件 `wordbase`，通常为 `txt` 格式每行一个。在 `wordbase` 目录下可以找到一些我们提供的词库示例。\n\n```\npython server.py {wordbase} --addr {addr}\n```\n\n其他参数请参见 `--help` 命令的输出。\n\n服务器启动后，应该看到类似于下面的日志输出：\n\n```\n[INFO 2024-09-01 11:41:06] server running on ws://192.168.0.1:1226\n[INFO 2024-09-01 11:41:06] waiting for players\n```\n\n记住 `ws://192.168.0.1:1226` 这个地址，在客户端启动时需要提供以便连接。\n\n## 设置 HTTP 服务器\n\n你可以使用任何支持静态资源的 HTTP 服务器（e.g. [nginx](https://nginx.org/)）来服务前端。我们以 Python 的 `http.server` 为例（请勿用于生产环境）：\n\n```bash\ncd app\npython -m http.server 1440\n```\n\n此时，可以从局域网内任意设备访问 HTTP 1440 端口进入游戏：\n\n```\nhttp://192.168.0.1:1440\n```\n\n进入后按照提示操作即可。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoodcoder666%2Fgartic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoodcoder666%2Fgartic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoodcoder666%2Fgartic/lists"}