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

关于部署问题 ,build以后 后台代理的api访问404 #10

Open
echozr opened this issue Feb 23, 2018 · 4 comments
Open

关于部署问题 ,build以后 后台代理的api访问404 #10

echozr opened this issue Feb 23, 2018 · 4 comments

Comments

@echozr
Copy link

echozr commented Feb 23, 2018

您好我部署以后代理的api访问都报404

@zhoujingang
Copy link

我也遇到同样的问题,jsonp访问的都正常,其它接口404

@k-water
Copy link
Owner

k-water commented Feb 25, 2018

线上部署需要启动后台服务node prod.server.js,同时还要做跨域处理,这个可以在后台直接写也可以用Nginx。 @echozr @zhoujingang

@zhoujingang
Copy link

首先很感谢你能回应^_^, 你的意思是在服务器起一个node服务吗?还是打包后只需要配置nginx就行了。

因为我目前就仅仅打包后,放在nginx里面,本地访问没有问题,所以我想应该是环境配置,所以不知怎么下手 @k-water 

@k-water
Copy link
Owner

k-water commented Feb 26, 2018

服务器还要启动一个node服务,相当于前后端分离吧,启动node服务把接口跑起来 @zhoujingang

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

3 participants