I have no idea if it is possible but I heard that the best practice is to create a frontend project and a backend project as two independence projects. To do that, I should use Nginx, right? But how exactly do that and how exactly is it works?
I just create an angular2 project with node.js and start the server to listen to for example 80 port.
Then I create a java project with jetty and start the server to listen to for example 90 port.
Then, should I in some way create Nginx project to merge frontend and backend? I need help cause I'm afraid I can't understant how to do that.
nginxwould host your project. Node.js is essentially "Backend" for an HTML/JS frontend - although obviously you can mix and match various languages for front and back end stuff. You don't even neednginxif you want to just host using node.js, but I'd still recommend it.