Closed msaus closed 6 years ago
Take a look at issue #26 (basically nick.exit()
calls process.exit()
)
What you can do is close your tabs with tab.close()
. NickJS doesn't come with the ability to stop Chrome unfortunately. It's just automatically killed on exit.
Thanks for that. I will try it out (^_^)ノ
I tried tab.close(). Then, I found that there are around 5 to 12 Google chrome processes being kept. I do not care of it being kept, but, I felt the number of process is quiet high after nickjs execution. Is this normal after execution?
Yes, I think it is normal. Chrome has at least one process per tab and other processes spreading the load for different tasks. I do not know how it's implemented, but very smart Google engineers must have decided that keeping processes speeds up the whole thing in normal browsing situations.
You can see it for yourself when using Chrome as a human. Open 10 tabs then close them, you'll see a lot of processes left running in your system.
To be clear though, if you still have Chrome processes after having called nick.exit()
, this NOT normal.
I am making web based api with express4 and pm2.
When I call nick.exit(), my api auto-restarts because it is calling exit() function.
So, is there any way that I can finish using nickjs? like not auto-restarting the api?