博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
【web框架】【 Cloud-Admin学习笔记(二)】【前后端分离的发布配置】
阅读量:3949 次
发布时间:2019-05-24

本文共 511 字,大约阅读时间需要 1 分钟。

因为spirng前后端分离设计,发布流程略有不同,前后端单独发布,通过nginx集成

1、前端项目打包

#转到前端项目根目录cd D:\001\myProject\GitHub\AG-Admin-v2-UI# 构建生成环境cnpm run build:prod

然后等待服务器build,如果成功后会提示

打包成功后的文件在dist目录,把文件拷贝到nginx根目录下html\dist

2、nginx配置

location / {           # 指向我们打包后上传的前端文件            root   html/dist;            index  index.html index.htm;        }         location /jwt/ {        # 转发请求到后端服务网关        proxy_pass http://127.0.0.1:8765/jwt/;        }        location /api/ {        proxy_pass http://127.0.0.1:8765/api/;        }

3、重启nginx

 

 

转载地址:http://uthwi.baihongyu.com/

你可能感兴趣的文章
Getting a Result from an Activity
查看>>
Allowing Other Apps to Start Your Activity
查看>>
Using the Location Manager
查看>>
Obtaining the Current Location
查看>>
Displaying the Location Address
查看>>
Connecting to the Network
查看>>
Managing Network Usage
查看>>
Parsing XML Data
查看>>
Optimizing Downloads for Efficient Network Access
查看>>
Minimizing the Effect of Regular Updates
查看>>
Redundant Downloads are Redundant
查看>>
Modifying your Download Patterns Based on the Connectivity Type
查看>>
Supporting Different Screen Sizes支持不同的屏幕尺寸
查看>>
Supporting Different Densities 支持各种屏幕密度
查看>>
Implementing Adaptative UI Flows 实施自适应用户界面流程
查看>>
Crossfading Two Views 淡入淡出的两种观点
查看>>
Using ViewPager for Screen Slides 使用屏幕幻灯片ViewPager
查看>>
Displaying Card Flip Animations 显示卡片翻转动画
查看>>
Zooming a View 缩放视图
查看>>
Animating Layout Changes 动画布局的更改
查看>>