Skip to content

Commit

Permalink
Merge pull request #12 from kaixinbaba/kaixinbaba
Browse files Browse the repository at this point in the history
补充下README
  • Loading branch information
521xueweihan authored Jul 6, 2020
2 parents 4ceb6b2 + 687d5af commit aaca28c
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 6 deletions.
49 changes: 44 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,55 @@
才是我想分享给大家的。通过上述的过程可以让新手更好的理解 **开源思想****第三方库的优劣****Web 开发技术****开发流程** 等。

## 安装
1. 下载项目:`git clone https://github.com/521xueweihan/hellogithub.com.git`
2. 安装依赖:`pip install -r requirements.txt`
3. 启动:`python server.py`

**开启管理后台权限:**
### 下载项目
```bash
$ git clone https://github.com/521xueweihan/hellogithub.com.git
# 进入项目目录
$ cd hellogithub.com
```
### 创建并激活虚拟环境
为了不和本地的环境冲突,推荐使用虚拟环境, 如果不想用虚拟环境也可以跳过,但是请保证当前是Python2.7环境
```bash
# Anaconda(推荐)
$ conda create -y -n hellogithub python=2.7
# 激活环境
$ conda activate hellogithub
```
请将`/usr/bin/python2.7`替换成自己可以执行的python2.7执行路径
```bash
# virtualenv
# 如果没有可以先安装
$ pip install virtualenv
$ virtualenv -p /usr/bin/python2.7 hellogithub
# 以防万一赋予可执行权限
$ chmod +x ./hellogithub/bin/activate
# 激活环境
$ source ./hellogithub/bin/activate
```
### 安装依赖
```bash
$ pip install -r requirements.txt
```
### 启动服务
```bash
$ python hellogithub/server.py
```
启动成功后就能访问 http://127.0.0.1:4000
### 开启管理后台权限
- 登陆一次
- 修改数据库中 admin 字段为 1
- 注销,重新登陆
- 点击用户名即可跳转到管理后台

### 退出虚拟环境
```bash
# conda
$ conda deactivate
```
```bash
# virtualenv
$ deactivate
```

## Todo
- 已完成爬虫架子、GitHub spider,准备做view层、event信息流
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ Flask-WTF == 0.14.2
gevent == 1.2.2
lxml == 3.8.0
huey == 1.4.0
redis == 2.10.6
redis == 2.10.6
werkzeug==0.16.1

0 comments on commit aaca28c

Please sign in to comment.