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

常用api #48

Open
hfc-advance opened this issue Dec 6, 2018 · 0 comments
Open

常用api #48

hfc-advance opened this issue Dec 6, 2018 · 0 comments
Labels

Comments

@hfc-advance
Copy link
Owner

退出进程

process.exit方法用来退出当前进程。它可以接受一个数值参数,如果参数大于0,表示执行失败;如果等于0表示执行成功。

if (err) {
  process.exit(1);
} else {
  process.exit(0);
}

如果不带有参数,exit方法的参数默认为0。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant