Raspberry stops mining after I close my Putty window

I followed the medium article to set up a NKN node on the Raspberry Pi and it worked very easily. No problems at all. But I noticed that when I close my Putty window, I can’t see my node anymore on the explorer. And when I connect to the Raspberry again it isn’t doing anything. Am I doing something wrong?

I followed this article: https://medium.com/nknetwork/make-your-own-nkm-new-kind-of-miner-out-of-a-raspberry-pi-dbeeed6d8130

You need to make sure you’re nkn service is running properly
use following command to check

sudo systemctl status nkn.service

If it gives you any error like “Service not found”, follow the “Plug N’ Play” section of that article, it will allow you to create a service and enable it to make sure it auto runs.

How am I supposed to enter this command while it’s mining?

You can open an ssh session using putty, once logged in, you should be able to check the service status.
Though I don’t have much experience with Rasp.Pi, so can’t say for sure. But it should work.
Also, Follow Plag N’ Play section of following article, it’ll help you to create nkn.service which will auto restart in case of a failure or power outage.