Quitting node.js gracefully

后端 未结 5 634
天涯浪人
天涯浪人 2020-11-30 19:27

I\'m reading through the excellent online book http://nodebeginner.org/ and trying out the simple code

var http = require(\"http\");

function onRequest(req         


        
5条回答
  •  不知归路
    2020-11-30 19:54

    Type either

    process.exit()
    

    or

    .exit
    

    to exit node gracefully.

    Hitting Control + C twice will force an exit.

提交回复
热议问题