i have recently bought a VPS to host my websites on it and since it is my first actual deploy experience I've had some problems with it
my goal here is to run multiple nodeJS apps on this vps (probably with a sub-domain like site1.domin.com ) and use it as host , by now each app runs successfully on a separate port using pm2 .
after that i purchased a domain for my site and now my problem is to link that domain name to point to my vps ip address with dns name servers .
notes : i read lot about how dns works ( actually this video cleared everything alot ! ) and how a single look up in the web searches different dns servers for that domain and link it to an ip which returns a page to the viewing browser , but i have never worked with it and I'm really confused , i know i have to set a record on my domain to point it to an ip , but how can i specify which port on that ip ? because in the panel for adding a record ( A type record - what are thse types anyway ? ) it asked only to link this domain - or a sub domain - to an ip .
and about nameservers , when i bought the vps it asked for two name servers and since i didn't have a domain back then , i added two default nameservers from cloudNS , is that important ? because my domain company had some name servers by default .