Port forwarding - should we leave it enabled?

When running tests, I had 23+ ports that weren’t opened. I realized I had all of those in my replit file and removed all but 1. When I ran another ‘npm test’, all of the ports were added back.

I learned that when port forwarding is on, replit automatically adds the forwarded ports to your replit file.

Should we leave port forwarding enabled? Obviously when asking AI, I’m getting conflicting answers based on the way I ask the question (If I’m trying to solve a ton of ports being added, they suggest removing it. If I’m asking if I should leave port-forwarding on, the answer is leave it on).

Update - been reading this doc and the Reddit post suggested reading in it (Replit Docs)

Basically if your app is running multiple processes, leave it on? Am I understanding this right?

It heavily depends what your app is doing. I’m not sure what program would’ve opened 23 ports on your Repl, but if that seems appropriate for the program that is fine. At its core though, forwarding a port is just exposing it from inside the Repl/your IDE to the outside internet so that it can send information (on say a website, a bot, or a server). If your Repl is forwarding ports that you do not want to be forwarded, you should disable the setting and manually set the ports you want (but otherwise there should be no harm in leaving it on). I imagine a lot of this is stuff you already know, so let me know if I’m misunderstanding the question a little.