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

建议支持修改 host 或使用 localhost #45

Closed
yunsii opened this issue Jan 18, 2022 · 2 comments
Closed

建议支持修改 host 或使用 localhost #45

yunsii opened this issue Jan 18, 2022 · 2 comments

Comments

@yunsii
Copy link
Contributor

yunsii commented Jan 18, 2022

WSL 下通过浏览器 127.0.0.1 不可访问 WSL 下的服务,需要改为 localhost 才行,已经改累了 _(:з」∠)_

@gogoyqj
Copy link
Owner

gogoyqj commented Jan 18, 2022

[email protected]

module.exports = {
  url: './swagger.json',
  ...
  hostname: 'localhost',
  ...
}

@gogoyqj gogoyqj closed this as completed Jan 18, 2022
@yunsii
Copy link
Contributor Author

yunsii commented Jan 18, 2022

[email protected]

module.exports = {
  url: './swagger.json',
  ...
  name: 'localhost',
  ...
}

应该是 hostname

const yapiTMP = await serve(remoteSwaggerUrl, config.yapiConfig, config.hostname);
已经试过了

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