What is localhost:8080?
On the Internet, everything connected has an IP address which uniquely identifies Internet devices. A TCP/IP connection is always made to an IP address and a specific port on that address.
What does localhost:8080 mean?
- localhost is the machine name or IP address of the host server.
- 8080 is the address of the port on which the host server is listening for requests.
What is a port?
A port is a virtual point where network connections start and end. Ports are software-based and managed by a computer's operating system. Ports are standardized across all network-connected devices, with each port assigned a number. In total , the system has 65535 ports to be used for providing services. Port numbers 0 to 1024 are reserved for privileged services and designated as well-known ports. This list of port numbers are specified in RFC 1700.
Usually one port is coupled to a specific process or "service" on the target computer. Some port numbers are standardized, like 80 for http , 20 and 21 for File Transfer Protocol (FTP) and so on. Because of that standardization you usually don't need to put port numbers into your web addresses.

localhost:8080
Localhost is always your own computer. Your computer is talking to itself when you call the local host. Operating systems will normally resolve the hostname localhost to 127.0.0.1, your loop back interface. When running a web server on your computer, you need to access that server somehow - and since port 80 is already busy, you need to use a different port to successfully connect to it. Although any open port is fair game, usually such a server is configured to use port 8080, hence when accessing your server you type in:
So if in a browser, if http://localhost:8080 is entered, it simply means to server web-pages from local web-server which is listening for web-requests on 8080 port. The machine might not be connected to internet at all and still web-pages can be rendered in browser from local hard-drive.
Port 8080
Port 8080 is typically used for a personally hosted web server, when the ISP restricts this type of usage for non-commercial customers. But there is nothing that stops a process to listen for http requests on another port, like 98765, 1234 or 8080. Usually this is used for debugging purposes to not intermingle with another process (like IIS) already listening to port 80 on the same machine.

To get around this, you can use whatever port you like. You could use port 12345 if you wanted to. Port 8080 is the just the default second choice for a webserver.
NEXT.....How to improve Server Response Time