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

你好。访问接口504错误是啥原因呢? #15

Closed
Gala-1024 opened this issue Jul 30, 2017 · 7 comments
Closed

你好。访问接口504错误是啥原因呢? #15

Gala-1024 opened this issue Jul 30, 2017 · 7 comments

Comments

@Gala-1024
Copy link

npm run dev跑起来之后,
登陆接口报错

[HPM] Error occurred while trying to proxy request /auth/user from localhost:8080 to http://localhost:8889 (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors)

@Molunerfinn
Copy link
Owner

api接口请用npm run server跑起来。README已经更新~

@Gala-1024
Copy link
Author

好的。谢谢,可以了

@Nebulazheng
Copy link

请问我也是504错误 ,是修改.env.js吗?
我的是:
import * as dotenv from 'dotenv' let path = process.env.NODE_ENV === 'test' ? '.env.test' : '.env' dotenv.config({path, silent: true})

@Molunerfinn
Copy link
Owner

@Nebulazheng 上面不是说了:api接口请用npm run server跑起来么...

@Molunerfinn
Copy link
Owner

Node默认不支持ES6的import语法,需要用babel转义一下。

@Nebulazheng
Copy link

@Nebulazheng 上面不是说了:api接口请用npm run server跑起来么......

可以运行了谢谢

@Nebulazheng
Copy link

请问 我启动项目可以正常运行登录了,但我尝试用postman去post登录接口,会返回用户不存在,console models/user.js中getUserByName(name)函数的name是undefind,在启动vue页面登录时打印出来正常

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