Localhost not running on the port

when I was trying to run the app it the localhost was not running on the given port I even tried using different port number but still it did not worked. Can anyone help me.

please clarify which app you are referring to?

So I created a javascript app in my visual studio code. The server was responding in the terminal but when I tried to run in the browser my localhost was not working on any given port