1、 qa-datacenter
下载新工程—在老工程同级目录
http://172.16.13.191/QA/qa-datacenter.git
2、安装node
brew install node
npm i(npm i -h;npm i= npm install)
npm run build——每次都要执行一次,编译
3、修改配置文件
sudo vi nginx.conf (在目录 /usr/local/etc/nginx/ 下修改)
server {
listen 2121;
server_name vue;
root /var/www/qa-datacenter/dist;
charset utf-8;
access_log /var/www/Log/nginx.access.log;
error_log /var/www/Log/nginx.error.log;
client_max_body_size 150M;
large_client_header_buffers 4 16k;
client_body_buffer_size 128k;
location / {
add_header Access-Control-Allow-Origin *;
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Mx-ReqToken,X-Requested-With';
}
}
4、重启nginx
每次启动
1、sudo nginx
【2、在目录下: /var/www/python-release/django/dataCenter,启动 uwsgi
uwsgi --ini uwsgi8000.ini】应该没用
线上网址: 172.16.196.18
3、项目目录下执行命令
npm run dev
网友评论