operate-jq
v1.1.0
Published
> this is a jquery project
Readme
camel_project dashboard
this is a jquery + bootstrap + gulp project
开发环境
# 安装依赖(构建工具的)
npm install
# 安装构建工具
npm i -g gulp
# 编译代码
gulp
# 本地前端服务,建议用nginx,可以重写static的路径,使得访问路径仍然可以用static(其实是devstatic)
# 本地前端服务,需改变src/js/common/common.js和src/js/login.js 中的serverUrl,并开启nginx。
# nginx配置见最下面
# 目的代码在 devstatic文件夹中
# 登录页面 http://localhost:8033/devstatic/login.html
# 首页http://localhost:8033/devstatic/content/userManager/driver_view.html
生成环境
编译(生成md5防止缓存)
gulp build
# 目的代码在 static文件夹中
# 登录页面 http://域名/static/login.html
# 首页 http://域名/static/content/userManager/driver_view.html开发环境nginx配置
nginx配置
server {
listen 8033;
server_name 127.0.0.1 localhost;
set $root_path 'D:/worksource/运营管理系统/web';
root $root_path;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location / {
rewrite '^/static/(.*)\.*' '/devstatic/$1' permanent;
root $root_path;
index index.html index.htm;
}
location ~ /api {
include proxy_params;
rewrite ^/api/(.*)$ /$1 break;
proxy_pass https://appdrivert1.yoohoor.com:5009;
add_header Access-Control-Allow-Origin "*";
add_header Access-Control-Allow-Methods "POST, GET, OPTIONS, PUT, DELETE";
add_header Access-Control-Allow-Headers "X-Requested-With";
add_header Access-Control-Allow-Headers "content-type, accept";
}
}