0

I used node.js to setup tailwind on my web project. I will often need to setup it again, and need it running to -watch changes. However, even after quitting visual studio code, node.js is running in the background.

I think it overheats my pc, since I reset it recently and that problem ressurfaced when i re-installed node.js

What is the best procedure to "quit" node.js when I'm no longer working? And when I open my project again?

* I have no experience with node.js.* Please explain carefully where to run any command, as if I'm using it for the first time.

I tried a few "kill" commands in the terminal of the project, but node.js is still running. I expected it to stop node.js to run in the background. I also pressed Ctrl+Z or CTRL+C on the terminal and it just wrote ^C.

Thanks in advance!

Mariana
  • 1
  • 1

1 Answers1

0

If you want to shut down the server, let CRT-C first then close the terminal. Do not kill the terminal when the server is running, it can make the server run in the background as you say.

So if the server run in the background you can kill port. You can search for that, another solution in Stackoverflow already have an answer for that. In here: How do I kill the process currently using a port on localhost in Windows?

solution for CRT-C is not working from here: Node JS ctrl + C doesn't stop server (after starting server with "npm start")

any-1507
  • 25
  • 7
  • Hello, thank you for your attention. I wrote "CRT-C" in the terminal. This is what it wrote me back: CRT-C : The term 'CRT-C' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + CRT-C + ~~~~~ + CategoryInfo : ObjectNotFound: (CRT-C:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException – Mariana Jun 12 '23 at 14:37
  • Also, I'm afraid I'm not writing in the right spot. The window is called Powershell - is that correct? As to the first link you addressed, thank you so much. I'll look into it but I'm not useing localhost. – Mariana Jun 12 '23 at 14:41