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

如何指定端口 #89

Closed
baisijian opened this issue Apr 26, 2020 · 4 comments
Closed

如何指定端口 #89

baisijian opened this issue Apr 26, 2020 · 4 comments

Comments

@baisijian
Copy link

如何指定端口

@jaywcjlove
Copy link
Owner

@baisijian 什么意思,是启动服务还是代理端口?

@baisijian
Copy link
Author

@jaywcjlove mocker ./mocker/index.js --port 8080 ?

@jaywcjlove
Copy link
Owner

@baisijian 端口指定是通过环境变量 PORT

let DEFAULT_PORT = parseInt(process.env.PORT, 10) || 3721;

@jaywcjlove
Copy link
Owner

  mocker mock/index.js
  mocker mock/index.js --port 7788
  mocker mock/index.js --host 0.0.0.0
  mocker mock/m1.js test/m2.js
  mocker mock/m1.js --config mocker.config.json

现在更强大了一点,不单通过环境变量,配置都可以指定端口,升级到 [email protected]

#144

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