typhoon analysing website for yyp
Project description
- 登录页面
- 数据库表结构初始化
- 数据内容导入和导出
- 数据页面展示
- 数据页面修改
创建虚拟环境并激活
python2 -m virtualenv venv
source venv/bin/activate
安装依赖
pip install -r requirements.txt
配置nginx
//安装nginx
yum install -y nginx
//添加配置
server {
listen 6600;
root /home/typhoon/;
index index.html index.htm;
# Make site accessible from http://localhost/
server_name dev.wlafit.com;
location / {
add_header Access-Control-Allow-Origin * always;
add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS' always;
add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';
if ($request_method = 'OPTIONS') {
return 204;
}
proxy_pass http://127.0.0.1:6000;
proxy_set_header X-Real-IP $remote_addr;
proxy_redirect off;
proxy_set_header Host $host:6600;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
//nginx载入配置
nginx -s reload
配置mysql
//安装mysql
//创建表
create database typhoonw;
//创建用户
grant all privileges on typhoonw.* to 'typhoonw'@localhost identified by '1qaz@WSX3edc';
运行(开发环境)
export FLASK_APP=typhoonw
export FLASK_ENV=development
flask run --port 6000
安装supervisor
yum install -y epel-release
yum install -y supervisor
systemctl enable supervisord
systemctl start supervisord
systemctl status supervisord
/etc/supervisor/conf.d下添加typhoon.conf
[program:typhoon]
command = /root/typhoon/venv/bin/gunicorn --bind 0.0.0.0:6000 --workers 1 --worker-class gevent typhoonw:create_app()
directory = /root/typhoon
user = root
startsecs = 3
redirect_stderr = true
stdout_logfile_maxbytes = 50MB
stdout_logfile_backups = 10
stdout_logfile = /root/typhoon/typhoon.log
相关路径请自行修改
创建日志文件夹
touch /root/typhoon/typhoon.log
5.4. supervisorctl reload 5.5 supervisorctl start parkingserver 5.6 supervisorctl status
初始化数据库
访问 localhost:6000/db
ok!
访问 localhost:6000/index
上传文件
链接:
/auth/login /auth/logout /data/add_item /data/index /data/landing_intro /data/parting_intro /data/query /data/total_data/string:type_str /db /hello /static/path:filename
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file typhoonw-1.0.1.tar.gz.
File metadata
- Download URL: typhoonw-1.0.1.tar.gz
- Upload date:
- Size: 665.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/2.7.15+
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5faf7d1b47819744bc3a91d26fe1051a44586bd57008c3b06596edb332239973
|
|
| MD5 |
6e02f2b0eaf99f42d0ee09b5573d049e
|
|
| BLAKE2b-256 |
0ba68d6089151d88523135de117048c0ee21382df93ba26b447052defebfc1a9
|
File details
Details for the file typhoonw-1.0.1-py2-none-any.whl.
File metadata
- Download URL: typhoonw-1.0.1-py2-none-any.whl
- Upload date:
- Size: 667.5 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/2.7.15+
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
877a395d78468b6a1df7b7653f3b16867c2645082cb2c4f101e3e3e43934027a
|
|
| MD5 |
4662b0fdac481ca7ab19a6a95deb84c6
|
|
| BLAKE2b-256 |
35dd554268205369f26d21e5a28c442c2d249ea82094ab2d9a3b4f5dea74e47e
|