博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
node.js退出命令_如何在Node.js中退出程序?
阅读量:2515 次
发布时间:2019-05-11

本文共 633 字,大约阅读时间需要 2 分钟。

node.js退出命令

When fatal happened, we’d like to kill the program. How to exit the program in ?

当发生致命 ,我们想终止该程序。 如何退出的程序?

You can use:

您可以使用:

process.exit()

Here, “process” is a global process object. exit method ends the process.

在此,“过程”是全局过程对象。 exit方法结束该过程。

process.exit([code])

process.exit([code])

Ends the process with the specified code. If omitted, exit uses the

‘success’ code 0.

用指定的代码结束进程。 如果省略,则退出使用

“成功”代码0。

To exit with a ‘failure’ code:

要以“失败”代码退出:

process.exit(1);

process.exit(1);

The that executed Node.js should see the exit code as 1.

执行Node.js的应该将退出代码显示为1。

Answered by Eric Z Ma.
埃里克·马(Eric Z Ma)回答。

翻译自:

node.js退出命令

转载地址:http://xaowd.baihongyu.com/

你可能感兴趣的文章
Kaldi中的Chain模型
查看>>
spring中的ResourceBundleMessageSource使用和测试示例
查看>>
css规范 - bem
查看>>
电梯调度程序的UI设计
查看>>
转自 zera php中extends和implements的区别
查看>>
Array.of使用实例
查看>>
【Luogu】P2498拯救小云公主(spfa)
查看>>
如何获取网站icon
查看>>
几种排序写法
查看>>
java 多线程的应用场景
查看>>
dell support
查看>>
转:Maven项目编译后classes文件中没有dao的xml文件以及没有resources中的配置文件的问题解决...
查看>>
MTK android 设置里 "关于手机" 信息参数修改
查看>>
单变量微积分笔记6——线性近似和二阶近似
查看>>
补几天前的读书笔记
查看>>
HDU 1829/POJ 2492 A Bug's Life
查看>>
CKplayer:视频推荐和分享插件设置
查看>>
CentOS系统将UTC时间修改为CST时间
查看>>
redis常见面试题
查看>>
导航控制器的出栈
查看>>