Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

怎么实现部署呢 #33

Closed
benyVip opened this issue Aug 15, 2018 · 16 comments
Closed

怎么实现部署呢 #33

benyVip opened this issue Aug 15, 2018 · 16 comments

Comments

@benyVip
Copy link

benyVip commented Aug 15, 2018

看到前后端的代码是分离的,怎么部署呢?

@Heeexy
Copy link
Owner

Heeexy commented Aug 15, 2018

前端打包之后就是纯静态文件,随便部署在Nginx还是什么服务器里

@Heeexy Heeexy closed this as completed Aug 15, 2018
@benyVip
Copy link
Author

benyVip commented Aug 15, 2018

那就是前后端分开部署是么?

@Heeexy
Copy link
Owner

Heeexy commented Aug 15, 2018

可以的.
不会玩Nginx的话,前端打包扔到springboot的静态文件夹里也是可以一起部署

@benyVip
Copy link
Author

benyVip commented Aug 15, 2018 via email

@Heeexy
Copy link
Owner

Heeexy commented Aug 15, 2018

是的, 打包扔到springboot 的resource/public文件夹下就可以了

DefaultView.java里已经配置过了首页路径指向index.html了

@benyVip
Copy link
Author

benyVip commented Aug 15, 2018 via email

@Heeexy
Copy link
Owner

Heeexy commented Aug 16, 2018

image

@benyVip
Copy link
Author

benyVip commented Aug 16, 2018 via email

@Heeexy
Copy link
Owner

Heeexy commented Aug 16, 2018

那只能你再检查下 或者找找其它放静态文件路径的方法啦

@benyVip
Copy link
Author

benyVip commented Aug 16, 2018 via email

@Heeexy
Copy link
Owner

Heeexy commented Aug 16, 2018

生成的dist下的文件扔进来 不包括dist
或者你直接去public下面自己建个index.html 看看localhost:8080/ 是不是进了你的index.html

@benyVip
Copy link
Author

benyVip commented Aug 16, 2018 via email

@Heeexy
Copy link
Owner

Heeexy commented Aug 16, 2018

npm run build

@benyVip
Copy link
Author

benyVip commented Aug 16, 2018 via email

@Heeexy
Copy link
Owner

Heeexy commented Aug 16, 2018

之前npm install 过没有

@benyVip
Copy link
Author

benyVip commented Aug 16, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants