Stop the node process when done indexing

I was confused when running `index`, because the message clearly told me to start another node process, but the node kept running.
Adding this small piece of code actually kills (with a success) the process.