Is it safe to open a server application on the internal network to the public internet


I am a programmer but I am currently learning about web development in general. I’m creating a server on my local host using nodejs and express. It’s available on my local host but I want to test it with a domain I have, so I can access it from any device anywhere.

What I decided to do was change my router settings to direct any traffic it gets on its IP to my computers internal IP on port 3000 so anyone can access the my html pages from my local machine. This was working quite well.

But after some hours of working Bitdefender Antivirus alerted that It blocked some attacks from a specific IP on port 3000. This lead me to question how safe It was to be doing this. The server is running on my home machine that has my regular files and documents.

Of course I’m only serving the html pages for the site but can someone kindly explain the security implications of using your regular home router as a server as opposed to a dedicated server or a web hosting service.

Note 1: I’m not interested in other aspects such as bandwidth since that’s not going to be a problem.

Note 2: Also I’m using Netlify’s free web hosting right now as an alternate (or instead of the alternate) but it’s god awfully slow to load my simplest html page. It takes a while (inconsistent as well) before the browser can even resolve the domain and then loads the content progressively slowly ( I mean you see things like the main image slowly reveal). when using my own router it’s blazingly fast; not just on my local machine