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

json请求失败 #5

Closed
tomee-oy opened this issue Jun 7, 2017 · 5 comments
Closed

json请求失败 #5

tomee-oy opened this issue Jun 7, 2017 · 5 comments

Comments

@tomee-oy
Copy link

tomee-oy commented Jun 7, 2017

请求时报错:“POST http://localhost:8080/mockapi/data.json net::ERR_CONNECTION_REFUSED”,路径被拼成了“localhost:8080”,应该是“localhost:3000”吧?

@duxianwei520
Copy link
Owner

@iEricOuyang 路径没错的,本地项目开启的端口是3000,但是再开启一个node服务不可能再是3000了,会冲突的啊,你可以看mockserver.js里面,listen的是8080端口,而不是3000

@wangcwang
Copy link

数据请求报错,没有数据显示啊!

@tomee-oy
Copy link
Author

tomee-oy commented Jun 8, 2017

一个项目要开两个服务?为啥?

@tomee-oy
Copy link
Author

tomee-oy commented Jun 8, 2017

@duxianwei520 明白了,项目跑起来要开两个服务,一个用node mockserver监听提供数据服务,另一个用npm start开启本地项目热点。

@duxianwei520
Copy link
Owner

@wangcwang 你看看network里面 有没有发出来网络请求,请求是否有回应的

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