赞
踩
环境:centos6
安装python3 pip3
cd /opt
git clone https://github.com/githublitao/api_automation_test
pip3 install -r requirements.txt
pip3 install https://github.com/darklow/django-suit/tarball/v2
DATABASES = {
'default': {
# 'ENGINE': 'django.db.backends.sqlite3',
# 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
'ENGINE':'django.db.backends.mysql', # 数据库类型,mysql
'NAME':'api_test', # database名
'USER':'root', # 登录用户
'PASSWORD':'123456', # 登录密码
'HOST':'127.0.0.1', # 数据库地址
'PORT':'3306' # 数据库端口
}
}
python3 manage.py makemigrations
python3 manage.py migrate
python3 manage.py createsuperuser
用户名密码admin 123456 邮箱
npm install --global vue-cli
cd frontend
npm install node-sass --save-dev --unsafe-perm=true --allow-root
npm install --unsafe-perm=true --allow-root
npm run build
修改api_automation_test/frontend/src/api/api.js(端口有冲突时)
export const test = 'http://47.96.167.207:8833';
启动api_test
python3 manage.py runserver 0.0.0.0:8833
后台运行 nohup python3 manage.py runserver 0.0.0.0:8833 & > manage.log
访问:前台http://47.96.167.207:8833
后台http://47.96.167.207:8833/admin/
设置反向代理
server {
listen 80;
server_name pt.weikeu.com;
autoindex on ;
location / {
proxy_pass http://47.96.167.207:8833/;
}
}
访问:
npm install 时出错 Error: EACCES: permission denied
解决: npm install -g electron(你要装的软件) --unsafe-perm=true --allow-root
本次使用npm install --unsafe-perm=true --allow-root
报node-sass没有安装
node-sass是解析sass和scss=>css的基础,webpack中的sass-loader依赖于node-sass,
所有想要打包sass和scss文件,这个依赖是避免不了的
解决:npm install node-sass --save-dev --unsafe-perm=true --allow-root
参考https://testerhome.com/topics/13609
个人博客: http://weikeu.com
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。