{"id":21955251,"url":"https://github.com/mindawei/p2p","last_synced_at":"2025-06-22T18:34:00.771Z","repository":{"id":215749589,"uuid":"53779438","full_name":"mindawei/p2p","owner":"mindawei","description":"一个基于 python 的 flask 框架的资讯网站， http://119.29.100.53:8086/","archived":false,"fork":false,"pushed_at":"2018-08-05T12:36:12.000Z","size":13785,"stargazers_count":32,"open_issues_count":0,"forks_count":18,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-23T12:49:41.168Z","etag":null,"topics":["flask","html","mongodb","python","website"],"latest_commit_sha":null,"homepage":"","language":"Python","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/mindawei.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":"2016-03-13T10:34:03.000Z","updated_at":"2024-07-18T07:28:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"ebab877d-2e32-498b-8846-7087a42eb804","html_url":"https://github.com/mindawei/p2p","commit_stats":null,"previous_names":["mindawei/p2p"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mindawei/p2p","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindawei%2Fp2p","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindawei%2Fp2p/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindawei%2Fp2p/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindawei%2Fp2p/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mindawei","download_url":"https://codeload.github.com/mindawei/p2p/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindawei%2Fp2p/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261343857,"owners_count":23144743,"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":["flask","html","mongodb","python","website"],"created_at":"2024-11-29T07:30:14.799Z","updated_at":"2025-06-22T18:33:55.750Z","avatar_url":"https://github.com/mindawei.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"一个基于 python 的 flask 框架的资讯网站\n\n演示地址： http://119.29.100.53:8086/\n----\n\n# 1 背景介绍\n该比赛要求参赛者开发一款数据舆情产品，帮助用户了解 P2P 行业现状。本人在比赛中负责网站的设计、开发和部署。团队最终排名第2。涉及内容：\n* 前端：HTML5 + CSS + JavaScript+JSON\u003cbr\u003e\n* 后台：Python轻量级Web应用框架Flask\u003cbr\u003e\n\n# 2 项目基本介绍\n* [项目介绍PPT](https://github.com/mindawei/p2p/blob/master/doc/klj.pdf)。\n* 本项目主要是一个展示数据的网站。\n* 数据来源是其它三位队友爬取数据后处理得到的，他们的项目在[ others ](https://github.com/mindawei/p2p/tree/master/others)目录中。\n* 本项目数据源在[ static/data ](https://github.com/mindawei/p2p/tree/master/static/data)目录中，项目启动前需要将它们导入到 mongodb 数据库中。\n\n# 3 QuickStart\n## 3.1 安装环境\n1. 安装 python 2.7\u003cbr\u003e\n下载 python 安装文件，安装后配置系统环境变量。\u003cbr\u003e\n可参考[《Flask入门_Windows下安装》](https://www.cnblogs.com/Christeen/p/6514713.html)\n\n2. 安装 flask\u003cbr\u003e\n命令行运行 `pip install flask`。\u003cbr\u003e\n可参考[《Flask入门_Windows下安装》](https://www.cnblogs.com/Christeen/p/6514713.html)\n\n3. 安装 pymongo\u003cbr\u003e\n命令行运行 `pip install pymongo`。\n\n4. 安装mongodb 数据库\u003cbr\u003e\n* 官网下载[安装包](https://www.mongodb.com/download-center#community)\n* 创建一个db文件夹，我的文件位置是 `C:\\software\\mongdb3.6.3\\db`\n可参考[《Windows 平台安装 MongoDB》](http://www.runoob.com/mongodb/mongodb-window-install.html)\n\n## 3.2 启动项目\n1. 在 mongodb 目录的 bin 目录中执行 mongod.exe 文件。\u003cbr\u003e\n`C:\\software\\mongdb3.6.3\\bin\u003emongod --dbpath C:\\software\\mongdb3.6.3\\db`\n![](https://github.com/mindawei/p2p/blob/master/doc/imgs/01.png)\n\n2. 将数据导入到 mongodb 数据库中。\u003cbr\u003e\n项目目录下运行 `data_to_mongodb.py` 文件， 命令行输入 `python data_to_mongodb.py`。\n![](https://github.com/mindawei/p2p/blob/master/doc/imgs/02.png)\n\n3. 启动项目。\u003cbr\u003e\n项目目录下运行 `run.py` 文件, 命令行输入 `python run.py`。\n![](https://github.com/mindawei/p2p/blob/master/doc/imgs/03.png)\n\n4. 访问项目\u003cbr\u003e\n输入 `http://localhost:8086` 进行访问。\n\n# 4 效果展示\n访问地址： http://119.29.100.53:8086/\n\n一个测试账号 用户名：test  密码： 123\n\n![](https://github.com/mindawei/p2p/blob/master/doc/imgs/04.png)\n\n![](https://github.com/mindawei/p2p/blob/master/doc/imgs/05.png)\n\n![](https://github.com/mindawei/p2p/blob/master/doc/imgs/06.png)\n\n![](https://github.com/mindawei/p2p/blob/master/doc/imgs/07.png)\n\n![](https://github.com/mindawei/p2p/blob/master/doc/imgs/08.png)\n\n![](https://github.com/mindawei/p2p/blob/master/doc/imgs/09.png)\n\n# 5 后续项目\n[zsw](https://github.com/mindawei/zsw) 是基于该项目的一个简化版本，但是增加了一些帖子评论等功能。\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmindawei%2Fp2p","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmindawei%2Fp2p","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmindawei%2Fp2p/lists"}