The most secure system would be one that doesn't, and never has, connected to the internet, but that's not practical.
You're right to be cautious, but it's best to find the right solution and open what ports you need.
You can, of course, just have your website served on port 80, have it routed correctly using a reverse proxy like NGINX and have your frontend speak to your server via websockets on the same host and not have to open up any more ports
Isn't it better if I open less port? Just for security reason
Yes, of course.
The most secure system would be one that doesn't, and never has, connected to the internet, but that's not practical.
You're right to be cautious, but it's best to find the right solution and open what ports you need.
You can, of course, just have your website served on port 80, have it routed correctly using a reverse proxy like NGINX and have your frontend speak to your server via websockets on the same host and not have to open up any more ports
Thanks Si!
I would try that and do some research about it.
Appreciate it!